Pupils see school as a substitute mother and project their feelings about their real mothers on to lessons, rules and teachers, according to a teacher and school consellor.
So, many of their reactions to classroom events are, in fact, responses to broader feelings of anger, resentment or dissatisfaction at home.
In his new book, Feeling Like Crap, Nick Luxmoore argues that all pupils create their own ideas of school, influenced by their early experiences with their parents.
He said: "School so powerfully evokes for everyone an expectation of nurture, of being looked after by parent-figures, while being in competition with sibling-figures .
"Any institution concerned with the care and development of young people is bound to be an unconscious reminder of that original carer."
Mr Luxmoore therefore believes that the term "this school" is used by pupils when, in fact, they are talking about being understood - or misunderstood - by their mother: "nobody cares about me at this school"; "this school's only bothered about what other people think".
In particular, pupils respond to teachers as if they were mother-figures. So pupils approach school warily, wanting to be looked after by the institutional mother, but fearing that she might be busy, irritable or distracted.
A baby develops a sense of self by working out what generates approval from its mother. Pupils need this almost as urgently. But school can be either an affirming, praise-filled mother or a critical, unflattering one.
The image of themselves that is reflected back from teachers and classmates helps pupils to develop a sense of self. But they resent needing this positive reflection of themselves, because it leaves them vulnerable: what if the other person cannot recognise or meet their needs?
There are two ways to defend against this need for approval, according to Mr Luxmoore. One is to idealise the school as a kind and loving mother- figure. These pupils work hard, volunteer wherever possible and wear their uniform with pride.
The other is to pre-empt a withdrawal of maternal favour by demonising the school. A pupil with an unhappy internal version of school may find it impossible to trust kind teachers, fearing that this might be withdrawn. Hating school is therefore safer than trusting it.
"So when young people talk about hating school or rubbish school . they don't necessarily mean the school they attend every day," Mr Luxmoore said. "It's just an insurance policy, a defence, a way of dealing with a mother-figure's power, and not to be taken at face value."
The role of the teacher, therefore, is to help pupils to reconcile their internal idea of school with the external reality of school.
"The institutional mother will never be perfect, and their feelings about her will always be mixed," said Mr Luxmoore. "They scratch their names on to her desks as vandalism (I want to destroy this school) and also as affection (I want to remain part of this school).
"When they can tolerate such mixed feelings without having to enact them . then they can relax and enjoy a sense of belonging."
Feeling Like Crap by Nick Luxmoore is published by Jessica Kingsley.