Maybe they had information that a male will carry contraband on this flight. Or they just regard the flight as high risk that someone is carrying drugs internally.
Doing an Xray will be seen by many/ in many cultures as less intrusive than a manual body search.
I have been pulled out by US CBP once for a body search whilst all other man walked. Still wasn’t thinking of racial profiling.
I suggest you cool down and move on. Plus, no one will ever force you to fly on a ME3 carrier.