Sometimes it is random, but sometimes it isn't… but they always say it's random. When it's not random, maybe a TSA officer thought they saw something unusual, or maybe they've received recent information regarding potential threats from a particular type of traveler.