Many children do sexual things before they even realize what it is.
I began achieving orgasm at the age of 4. I had no idea what sex or any of that stuff was...just that grinding against things felt good.

It's actually more common than you'd think. Just because your mom found it odd and punished you for it (totally the wrong reaction, by the way), doesn't make her right.