You're misinterpreting scripture. Look at the words. The meaning is clear.
(Proverbs 20:30 NIV) Blows and wounds cleanse away evil, and beatings purge the inmost being.
Solomon was a king. Most likely he had people beaten when they displeased him or were dishonest. He thought it was a good idea.