Her mother had probably always been taught/told that masturbating is a sin and so just had carried on the same theme to her own child. It might be imbedded in religious belief (most conservative Christians--and Catholics are Christians, btw--believe masturbating is a sin); I'm guessing that's the root cause of her mother's shaming her.
I found this quote: The Catholic Church teaches that "Masturbation constitutes a grave moral disorder" and that "both the Magisterium of the Church—in the course of a constant tradition—and the moral sense of the faithful have declared without hesitation that masturbation is an intrinsically and seriously disordered act." Mom was probably just scolding as she had been scolded.

