We all understand the desire to hit our children or significant others can happen. Doing it is at the least a problem.
I was only spanked once, and couldn't figure out why, it made no sense to me.
I got home from school early one day and the doorman let me into our apartment. He didn't come in, not a creepy old man. I was eight. My mother did a ritual spanking, clearly so I wouldn't do that again. But she didn't explain anything. Fear, of course, of what could have happened, and then fear of ever mentioning anything to do with sex. (She never did, in all those years of my growing up; neither did my father). That one spanking is understandable to me now, but not then. A conversation would have been wiser, as I was left knowing nothing, and hating being hit. I wasn't particularly stupid at eight and could have understood that she was worried about my safety. I didn't learn that, though, there not being that conversation.
The matter of spanking is argued, folks vary on it, a cultural variability going on about it. Not the same thing as this thread situation.