Being in the dog house dates back to the days of slave trading. The holds of ships carrying human cargo from Africa to the USA were modified to become enormous dormitories. This left little if any room below deck for crew members to sleep. This was solved by building kennel style huts (dog houses) on the deck for sailors to use as bunks. Of course sleeping on the upper deck in these hot humid and somewhat air-free hutches was very unpleasant. Hence getting into an uncomfortable situation became referred to as being in the dog house.