I used to work with a Kevin and a Mohammed.
Whenever we travelled to offsite offices Mohammed 100% of the time was picked for bag check, while Kevin was not picked once.
Mohammed was white, and Kevin was black.
It was completely racist, and never random.
You can not be racist towards white people. That is not a racism
Not defending the practice but the Mohammed thing has a possible origin that isn't directly racist. The common names among Muslims and their propensity to appear on various watch lists lead to a lot of false alarms on those with those names.
It may be a racist result but there is a pretty reasonable and understandable reason it happens, ignoring the legality and morality of that kind of tracking as well.
A person can get mistakenly (or not) flagged for special screening and get it over and over again - it happened to me many years ago.
I fixed it by filling out a form requesting a review, after which I received a “redress number” which could be entered into my booking information. It reliably stopped after that.