This phenomenon only happens in Hawaii . . . and Cuba & Nigeria & Indonesia & Peru & Sudan & Laos &…

The reason why the longest day of the year is not the hottest day of the year is complicated, but to simplify it, it is because even though the days are getting shorter you are still adding more heat during the day than is escaping at night. (Daytime is significantly longer than nighttime.) On average, the equilibrium point happens about five to six weeks after the solstice. (That is also why the shortest day of the year is not the coldest.)