we live in a world with lots of rules. some of them are dumb, but carry serious consequences if you're caught. the message is, if you're gonna break the rules, you need to at least get away with it. it's (usually) better to get caught by your parents the first time, rather than an institution like school that isn't as invested in the outcome for you as an individual.
not quite the same, but this reminds me of a conversation I recently had with my parents. they were fairly strict when I was a kid, and I was asking them as an adult why they were like that. they told me that they expected me to break the rules and considered it a healthy part of growing up. they set the rules conservatively so I wouldn't need to do anything terribly unsafe just to rebel.