After tiring of setting cooking fires in the middle of the floor, people eventually moved them to the wall where it was a lot less likely that you could trip and fall in. After a few houses were burned down, people then decided that some permanent container for fire was needed. The fireplace was born. However, after more houses burned down, someone discovered that chimneys were a useful addition to a fireplace. Then, after still more houses were burned down, it was decided that both chimneys and fireplaces should be made of bricks, stone or iron. An additional benefit was that interior walls could be painted in shades of white with oofty goofty names instead of black or dark gray.
Household pets could now be kept warm since they would park themselves directly in front of a fireplace. Still, everyone else in the house would still freeze during the Winter. Eventually, a fireplace or two would be built into every wall and gazillions of trees would be chopped down for fuel. Soon, fireplace tools were invented providing convenient weapons for murdering others. Mantles were also invented so that cats could sit on them to slap stuff on the floor for YouTube videos.
Today, because we don't have trees anymore and due to the high cost of fossil fuels, nuclear powered heating has become popular. Places like Chernobyl, Ukraine and northern Honshu in Japan are now 100% heated by nuclear power. This allows cooking food by merely holding it up while you decide which of your child's heads to feed first.