no one really 100% knows what triggers Security Screening (SS). It can be either random selection, or you can be red flagged if you are from a certain country that has relation to terrorism, or if your travel history includes such countries. Or if your work experience relates to something serious like military, certain government positions, etc.
When you look at Security Screening trackers (you can google it), you will see that most people who undergo SS are mostly from Iran, Iraq, Pakistan, some African countries, some from Russia, Belarus.