Lying to keep out of trouble
Fear of disapproval or punishment leads children to lie in order to avoid them.
Schools do nothing to discourage this; indeed they do a great deal to reinforce it. Skilful lying helps you to keep out of trouble. Authority is the enemy, and there is no need to tell your enemy the truth. You learn to keep quiet about things that are going wrong, and among your friends refusing to cooperate with authority may well be considered a kind of moral duty and earn you status. Status among your friends is for most school students at the very least as important as approval from the staff, and for many it is much more so.
Often students see copying at least part of their homework from the internet or from someone else as a normal practice. They admire skill in thwarting authority by eating sweets or texting or passing notes in lessons. They lie about reasons for arriving late at school and not having done their homework. This kind of minor deception becomes routine.
Children who are exhorted to be honest because they have been caught out in dishonesty have no reason to change their behaviour – usually they are not trusted even if they do. Schools preach honesty, but they expect dishonesty. When adults expect children in general to cheat, lie and misbehave then children in general will live up to the expectation.
The ways schools teach this kind of behaviour are, firstly, by making rules of little moral significance which can be disobeyed with an easy conscience, secondly by creating situations in which it is advantageous to cheat and lie, and thirdly by setting up a system of punishment which, far from discouraging such behaviour, exposes the fact that it is expected and therefore almost acceptable. (You only see notices saying 'Do Not Spit on the Floor' in places where people actually do spit on the floor. You only need punishments for cheating in schools where the pupils actually do cheat.)
If you have already been branded as dishonest, there seems to be nothing to be gained by speaking the truth in future. Lying to teachers, particularly if it is to support some friend who is in trouble, becomes automatic.
Resistance to restrictions, coupled with the wish to conform to the standards of one's friends persists into adulthood. Adults resent speed limits, parking restrictions and breathalysing, all standards imposed by authority, whereas conformity with the dress-codes, choice of drinks and political views of friends is taken for granted. It is thought amusing to boast about outwitting traffic wardens, for instance, but eccentric or outlandish to wear the wrong clothes.
Many adults see it as completely acceptable to make excessive profit, to exceed speed limits, to get drunk, to snort cocaine, to be paid in cash in order to avoid tax, to charge unreasonable expenses and to lie about it afterwards. It is a pattern of behaviour that they learnt at school.
Conformity and self-interest are what matter, and thoughtfulness and honesty take a humbler place. Of course authoritarian schools do not deliberately teach this lesson, but the behaviour of all too many of their ex-students shows how well it has been learnt.