I had a 23-hour layover in PEK, and as a US citizen with a US passport, I was able to exit the sterile area and wander about Beijing.
Did you have a copy of your itinerary with you in your carry-on baggage, showing an onward flight? Upon arrival in PEK, I was funneled to the "problems" line, but upon proof of onward travel (my UA.com receipt, as well as a receipt printed on UA card stock), they stamped my passport with a full-page "Transit Without Visa" stamp, valid for only 24 hours.
If you didn't have a BP, or a receipt showing onward travel with you at the time, I'm sorry for your experience, but you weren't adequately prepared to go through immigration.
I can empathize -- I was stuck in the sterile area of SkyPier in HKG for about an hour and a half because the UA desk was closed and I couldn't check my bags. I didn't do my research, and learned for next time.
Again, sorry to hear about your bad experience.
Last edited by ianmanka; Jul 2, 2012 at 10:25 am
Reason: "transit visa" -> "transit without visa"