How is this possible to get a separate FIDE ID when you already have one?
Unfortunately FIDE do not have proper data validation for these things. For instance, check out Lawrenson, Conor. This baby prodigy has been registered by FIDE as a chess player even though his birth year is 2022!
When Yu entered the Asian team championships in 2012 the arbiter's job was to enter his name and ID successfully in the pairing program. If he didn't do this and also entered a wrong date of birth then when the tournament results were sent to the China international rating officer they would have put the file through a program which would automatically generate a new FIDE Id for unregistered players. It would only throw an error if the name and date of birth were identical.
The quality of FIDE data has actually improved over the years. It was much worse, particularly pre 2001. Check out the early records of my club mate Dave Walker in Olimpbase. Surprisingly the records suggest that he/she got their first FIDE rating in January 1982 of 1845. Dave's sex is recorded as "W". He has the same rating and sex in the next list in July 1982 followed by 8 lists in which there is "no data available" for Dave before he re-emerges as a man in the January 1987 list with a rating of 2285. Obviously the transition was so successful that it came with 440 points of rating gain!
As somebody who has known Dave for more than 40 years I can tell you that he has always been a man, except when he was a boy :-). What happened becomes clear if we look at the FIDE records for Susan Walker in Olimpbase. Her first rating was 1885 in January 1983, the first list which records "no data" for Dave Walker. Dave Walker never was a woman. It is just that FIDE confused him with Susan Walker.
Note that Susan Walker went on to marry Keith Arkell and so become Susan Arkell. During the time she was married to Keith FIDE introduced IDs and the immediate data integrity benefit was seen when she divorced Keith and married Bogdan Lalic. FIDE were now clever enough to know that Susan Arkell and Susan Lalic were the same person. However they don't "know" that that person is the same as Susan Walker.
In that case can he register to a tournament with his unrated account?
It depends if he gives the correct information and if the arbiter is paying attention when he/she enters the information into the pairing program. If the arbiter makes another mistake then it could happen.