I see the point in selling bitcoins for yuans inside China, but foreigners who want yuans can buy some at a local bank. I wonder why they would buy you yuans if they're not in China.
I think you are wrong, if you are not in China you can't buy Yuan in your local bank, there are two(I think) branches of Bank of China (located in the US) that have begun to allow foreigners (non-Chinese) to open Yuan account's, with a minimum balance of $500, but unless you go to those actual branches it's very impractical.
If you are in China you can of course buy $US, if you are not Chinese there is a lot of paperwork in exchanging Yuan in to $US, however it is no problem to exchange $US into Yuan. You also must supply your passport to exchange and money in China, and your ID is recorded with the transaction.