We aren't trying to teach fear of punishment, we're teaching cause and effect at the very least, and right and wrong in many cases.
The knock-on effects of that can be unpredictable, though; there's a point where a kid learns not only "if my parents become aware of things they don't like, I get hurt" but also "if I don't like what's going on, I should hurt people weaker than me until I feel better." It happens sooner than people think, too. Kids don't always advertise when they've figured stuff out, particularly if you react negatively to them telling you things.
It's also very hard to de-escalate from that back to reasoning with them, because you can't logic them out of something you didn't logic them into -- so, ultimately, everything is either a threat or a suggestion. I can tell you from experience that once a kid raised under that paradigm gets strong enough that the threats stop working, you're essentially done parenting them.
I'm happy I don't have any kids to deal with anymore, but while I was the only times I've ever actually smacked a kid were always a situation where I look over just in time to see a little hand reaching towards something that is going to suuuuuuuuuuck so bad if they actually get their target. Trying to say "hey grabbing that handle is going to dump a pot of hot stew on your head why wasn't it turned facing the back of the stove so please take a couple steps away from it for me?" isn't really guaranteed to work or even feasible if it was. So if if comes down to watching shit unfold or acting, I'm gonna flick out a mommacat pop to deflect/block the hand before apologizing and explaining exactly why it was my bad for not pre-emptively fixing those sorts of problems. I would have rather avoided the whole situation but I missed something that could be really dangerous, and because I can't easily fix the kinds of things that could have happened I did that. So, yay, that didn't go badly and you're just a little startled instead of seriously injured so I can totally fix that with a hug and a piggyback ride for having to thwap your hand suddenly.
When they get older and decide to deliberately start pumping out assholery and being a hardheaded little shit or straight up ignoring me when I'm trying to chill things out and show them a better way to go about that shit? Well, you ever had someone lock their middle finger behind their thumb and thwack you with it?
I don't do
that but I will fwoosh one past your ear as a "hey, leave being an asshole to the professionals, little padawan" attention getter when you turn to stomp off or go back to your phone or whatever fit is being thrown. It's like when you got water in your ear and then the pressure floofs out and it drains and you can hear all sorts of shit again afterwards. THWA-POOMPH!
Also works great with cats that think they're clever by getting up on the counter to rummage in the cabinets... slink up silently, THWA-POOMPH past their ear, they instantly go as flat as they can and try to launch themselves anywhere else, assuming they lucked out on the near miss and learning that naughty counter kitties might randomly encounter sneaky fingerthwacks of doom!