Getting spanked is a good thing.
Throughout scripture, when the children of Israel did good in the sight of Yahweh, they were blessed. When they did evil they were punished. Sometime the punishment was even death.
Children get punished, men and women get punished, and even the nation gets punished.
Just as Yahweh God punishes us when we sin and do not follow His Way, God expects a father to punish his child when they are not being good little Israelites.
We are all supposed to follow The Way, and that means teaching our children The Way also.
SPARE THE ROD SPOIL THE CHILD
The notion that children will only flourish if chastised, physically or otherwise, for any wrongdoing.
This phrase has quite a long genesis. The coiner of the version that we use in everyday speech was Samuel Butler, in Hudibras, the satirical poem on the factions involved in the English Civil War, which was first published in 1662:
Love is a Boy,
by Poets styl'd,
Then Spare the Rod,
and spill the Child.
[by 'spill', Butler did mean spoil - that was an alternative spelling at the time]
The precise words were Butler's, but the proverbial notion is much older. William Langland's The vision of William concerning Piers Plowman, 1377, includes this line:
Who-so spareth ye sprynge, spilleth his children.
'Spilleth' is used to mean 'spoils', as in Butler's poem. 'Sprynge' was commonly used in medieval English to mean the verb 'spring', that is, 'rise quickly, at a bound'. It seems that Langland was using here as a synonym for 'sprig', that is, rod or offshoot of a plant, although the Old English Dictionary has no other records of 'sprynge' being used that way.
English version of the Bible pre-1377 don't include the line in the form we now use, but they do contain a similar thought, and this is probably where Butler took it from. In the KJV it reads:
Word Studies menu – 'Chastised and Punished'