Why is it hottest in the late summer when the days are getting shorter rather than around the summer solstice when the days are the longest?
Late summer is usually hotter than June in the northern hemisphere because the land and the sea absorb heat, and it takes time for this to happen. By late summer, they are warmer than they were in June, making the temperature warmer. Seas and oceans are particularly relevant in this respect. August is usually the month when the combination of strong sunlight and warm land and oceans leads to the highest temperatures.