For any legitimate reason the embassy personnel sees fit, and that includes lots and lots of reasons, including, but not limited to national security, law enforcement, public safety and etc.
Behar Intl. Counsel 619.234.5962 Kindly be advised that the answer above is only general in nature cannot be construed as legal advice, given that not enough facts are known. It is your responsibility to retain a lawyer to analyze the facts specific to your particular situation in order to give you specific advice. Specific answers will require cognizance of all pertinent facts about your case. Any answers offered on Avvo are of a general nature only, and are not meant to create an attorney-client relationship.
I added "immigration" and "passport" to your category so you get the correct avvo attorneys to look at your post...."discrimination" (your chosen category) would have been more of an employment category so hopefully you can now get a response from immigration attorneys.
My answer is not intended to be giving legal advice and this topic can be a complex area where the advice of a licensed attorney in your State should be obtained.