China is a very materialistic society with incredibly high inequality and it lacks any sort of welfare support network.
If you just walk around in shanghai, then the country might seem pretty close to first world levels of development. But if you go deeper inland, you will find hundreds of millions rural people who have been left behind, and still live in grinding poverty.
When you are that poor, then becoming a prostitute can be a acceptable option for you.