He was targeted because in Chinese eyes, Colombians are synonymous with "drug mule." If he was in a group and nobody else was Colombian, and nobody else got this treatment, I presume it was strictly because of nationality and there was no specific behavior or "probable cause" (in western terminology, for lack of a Chinese parallel). Yes, it was wrong of them to subject him to an x-ray procedure without consent. Where was this done? At the immigration booths or at Customs following baggage claim?
In retrospect, he should have absolutely refused, even at the cost of being put back on an outbound plane. Would have been nice if he had already had the Colombian Embassy Beijing phone number on his person at the time, but who would have anticipated...? At the very least, he should be reporting this incident to the Colombian Embassy in Beijing, preferably in person but at the very least by telephone, also to authorities and news media back home. Assuming it all went down as you said, this is an interesting incident, as I've never even heard of those notorious Nigerians being given Automatic Airport Xray treatment.
I'm not sure how much your friend's experience can be extrapolated into a warning to that broad group known as "other westerners", that last part of your message seems a bit overly dramatic and fear mongering.