Some types of accounts don't require any social security number and can be setup simply with your valid passport.
Upon leaving US, you can simply write yourself a check and open a US$ account in any of the branches of Bank of China in the city of your residence.
The difference between a regular check and a cashier's check is that Bank of China will hold the regular for up to 3 months before the fund can be withdrawed. Of course you earn interests during this 3 months period.
A cashier's chekc may cost you US$ 3 or US$ 5 per check or even free depending the bank and your account type.
By the way, it is not against law if you carry your pillow filled up with $100 bills back with you as long as you declare it at both customs houses.
Most people prefer wire transfer (prevailing transaction fee for an international wire transfer is US$35), which requires your having US$ accounts in both US and China but not necessarily the same bank.