I'm sure that rail wins over flights in terms of efficiency for passenger miles traveled. However, you often have to travel more miles to get to your destination. A direct flight can save a whole lot of time. Flights are much faster, although security theater adds a lot of time[1]; but for longer routes, or routes with many stops or connections for rail, the single segment operation of a flight starts to win.
Also, China has the advantage of authoritarianism which allows it to more easily get right of way that's well aligned for HSR. While it was once easy to get land for railroads, when there were active land grants, now you'd need to do a lot of work to get well aligned land to add a rail line; where they're still active, existing rail right of ways through developed areas are fine enough for slower service, but expanding the right of way to better align the tracks is a lot of work. In theory, you could eminent domain, but that process is long and expensive.
[1] In a world where you think it's possible to have government intervene to expand passenger rail in the US, it's equally possible to have government intervene to streamline the security theater in flights; or they might add the same security theater to passenger rail.
Openrailwaymap plots tracks by max speed, and you can see the map of China here: https://openrailwaymap.org/?style=maxspeed&lat=30.9587685707... --the tracks that are red-to-purple are the ones that are high speed.
Flights are nowhere near as efficient as rail, not to speak of the environmental issues.
It's factors like this that show how the US is falling behind in international competition.