Why do Japanese people use tables as beds?
Why don't you?
because it looks comfy as fuck doesn't it?
Back in the day and for a good while, Japanese apartments and houses had no central heating. This causes problems during winter, as you can imagine.
Thus enters the kotatsu. It's a very efficient form of space heater in that it heats a small, well-insulated area and doesn't waste its energy heating tons of air in the room that will just float away.
I've only just realized now that kotatsus have heaters inside of them.