What your friend is likely taking advantage of is the fact that tax rates are only one of the costs of doing business. So s/he probably takes clients in the US, and collects money in the US, but has the work done in China. Why? Because that way s/he can potentially enjoy a host of US tax breaks made possible by the convoluted nature of the tax system here.
The only money that needs to go to China is money to fund operations there. So your friend's profit margin will likely be orders of magnitude larger than if s/he tried to pull off a consultancy with all the programmers in the US.
Again though, the thing is, we were only talking about the tax systems, which are no better in China than they are in the US. That was my point. (On top of straight taxes, your friend might have some issues getting his/her money out of China as well come to think of it.)