Don’t kid yourself. It wasn’t just writing practice.
When I was 7-years old, I used to take piano lessons in a convent garden house, presided over by an Austrian nun. She used to smack my little fingers with a hard wooden ruler. Ouch!
Never said it was.
As a matter of fact, sometimes it wasn't even during lessons.
In my eighth grade class the boys were on one side of the room and the girls were on the other. One morning a nun walked down between the two rows of boys swinging her yardstick with criminal abandon. After three of four hits apiece, she informed us it was to "discourage us for things we were going to do."
Then we all stood up and said our prayer to start class.