Renting an apartment in Shanghai isn't necessarily that expensive, it just costs a lot if you want to buy one.
E.g. here are listings for 1000 yuan per month or less: https://sh.zu.fang.com/house/c20-d21000-n31/ I wouldn't believe any of the other claims made (e.g. the size is probably exaggerated), but behind each of these listings is someone willing to actually offer living space for that price.
The highest price category on that site is 8000 yuan or more, which is $1163.2 according to WolframAlpha.
Real "bottom" for non-shared apartment in Shanghai is ~3000 rmb (~$500) for a smallish place with a 1+ hour commute. Rents in the downtown are around 10000+ rmb.
I paid 1600 RMB per month for 18 m² in Minhang, fully furnished, with cooktop in a corner of the living room and own bathroom. Your "bottom" is not the actual bottom. Those places for 1000 RMB or less are super tiny (as I said, the size on the listing is exaggerated), but they do exist.
Healthcare is actually pretty good in big Chinese cities. China is actually getting close to universal insurance coverage. At this pace, it seems like the US might end up being the last country on Earth without some sort of government-backed universal coverage scheme.
There are many who know and understand that decision, and still move back, so they must (at least some) be factoring things like this into the decision to move back. Perhaps they feel that they can make a difference or perhaps some other reason, but the numbers in the article show that they are going back.
It's probably because there is a healthy tech industry in China and it's home.
If could take classes in China and possibly get a job making 50% more there, I'd probably come back to the US instead. A 50% raise isn't enough to justify being half a world away from my family.
Until you realize they are 4 times more likely to die in a car accident in China vs the USA. If you are just concerned about survivability, this isn’t a good bet.
Probably has to do with people not wearing seatbelts. I remember years ago the taxis had covers on back seats so you couldn't even reach the buckles. Then Shenzhen enforced belts on all seats and things got better there. I wonder if it spread to other cities.
As someone not actively involved in crime, gangs, etc. my chance of getting murdered in the US is roughly zero
But I do have political beliefs which would put me under threat in China were I to voice them or act on them. And I would want to raise my children in a place where they won't be discriminated against for being LGBT (although discrimination still happens in the US, at least you can be out and proud. In China, to my knowledge homosexuality is very much "don't ask don't tell")
If you're hiring developers you're not going to put your offices in the countryside just like the US isn't hiring many programmers in rural Missouri.