Long before the advent of air conditioning, which is pretty much ubiquitous in Japan, the Japanese people needed to learn to cope with their hot, sticky Summer climate. To that end, the whole period is liberally scattered with outdoor festivals. When it's too hot to sleep, you take your mind off of the misery by going to visit shrines, temples, and town squares, where street food, drink and dancing help make the hot season bearable. The traditions have held to this day.