Some factors:
People are more likely to lie or cheat if others are lying or cheating, or if a member of another social group (such as a student wearing a sweatshirt from a rival university) visibly flouts the rules. They are more likely to lie and cheat if they are in a foreign country rather than at home. Or if they are using digital rather than real money. Or even if they are knowingly wearing fake rather than real Gucci sunglasses.