I think some of it is the old, "I'm okay, you're okay" versus "I'm not okay, you're not okay." If we learn we're not okay, then anything "like" us as children; wanting/needing attention; thinking family members and classmates who tease us about being crybabies, stupid, lazy, liars, etc. are correct; when we grow up, it doesn't miraculously go away. If we feel bad for wanting attention, our own children wanting attention are going to be criticized. If we were called slow, stupid, lazy, etc., then any behavior like our own that we see in our children is probably going to be labeled the same way.
My stepmother and one brother were extremely sarcastic in a hurtful fashion and I use to be able to make you die laughing, literally; a sharp wit and sarcasm together can be deadly. She who lives by the sword, dies by the sword :-) It's taken me a zillion years of therapy to begin learning to think before I respond; that's why I prefer online to in-person; I can "correct" and think better about what I have to say and, when the stars are aligned right, be pleasantly tactful