A lot does come down to being underdeveloped. Or more specifically, living standards are lower, especially with the lower class (e.g. the poor in the US live far better than the poor in China). Take away all of developed nation's anti-poverty programs and minimum wage laws (that provide for floors on labor costs), combined with cost-inducing regulation that exists to protect human health and the environment, and yes, you would make products in the economy a lot cheaper.
If you accept the lack of access to Western goods, then it is much more reasonable.
Why is food so much cheaper? Why is land so much cheaper? Why are utilities so much cheaper? What are they doing that makes everything so cheap? IMHO, this is really a phd thesis sized undertaking and would probably teach us a lot about the inefficiencies in our western system.
Have you ever been to one of these places?
People are much poorer, and the standard of living is much lower. Things like utilities often don't exist, or or much less reliable than in richer countries.
Some things are cheaper: branded clothes and foods are generally priced beyond the means of most, so people don't buy them. Transport is cheaper, because people don't own cars - they walk, or bus, or share motor-scooters.
Accommodation is cheaper on a per-person basis, because 6 people in a single bedroom apartment is normal.
A few exceptions exist of course - the US health system costs a lot more than anywhere else in the world given the health outcomes. Places like Chile and Cuba pay a lot less for health care, but sit above and below the US on tables of life expectancy[1]. There are also things like extreme inequality in some countries which can cause other distortions.
But there generally really are no secrets - they live cheaper because they are poorer.
[1] https://en.wikipedia.org/wiki/List_of_countries_by_life_expe...
All this costs money, and it all adds up. Once the average Chinese citizen demands to have the same standard of living as his/her counterpart in the west, the price advantage will disappear.
Don't forget about currency manipulation. People in China are buying those things in yuan and then to do the comparison you're converting it to dollars at the manipulated exchange rate.
It's also not just because they're underdeveloped. Some cities in developing countries, like Luanda, Angola, have some of the highest costs of living in the world.