What do you do with a bad dog? You make them sleep outside in the small, cold, doghouse.
Putting someone in the "doghouse" is to shame, humiliate, and cut them off from everything and everyone else. The same way a dog is cut off from everything when they're forced outside, and have nowhere left to sleep but their dog house.
Yes I lied! It was a sin, I've committed many sins! Have I displeased you, you feckless thug?! 3.8 million new jobs. That wasn't good? Bail out Mexico?! Increase foreign trade?! Thirty million acres of new land for conservation! Put Mendoza on the bench! Raised three children!!
That's not enough to buy me out of the doghouse?!