It's all entirely random and nationally/racially based when the rules are enforced. Very ridiculous and another reason why expats complain about living in Qatar.