The ancient Sumerians kept written records of everything. How much wheat did a farm grow this year? Write it down. What do I have in the house? Make a list and write it down. To do all this listing and writing they needed people who could read and write. So, many people sent their children to school to learn to read and write.
Schools were run by the priests and school was very tough. Only boys could go to school. (If a girl wanted to learn to read and write that was ok, but she had to be taught by her parents or a tutor hired for that purpose.) In school, if a student messed up they would be whipped. The Sumerians believed that you only learned something if the lesson was reinforced with a beating.
The students were not maimed or crippled, but they were certainly sore. Even with this punishment, children wanted to go to school. After all, if you knew how to read and write you could always get a job, and maybe even get to be a priest.