Why divide total insolation by $4$?
Why does climate science divide total insolation by 4?

For two reasons, each of which halves the effects of insolation:

At any point in time, only half of the Earth is illuminated by the Sun. Another name for this factor is &quot;daytime&quot; versus &quot;nighttime&quot;.
At any point in time, the surface area of the Earth's hemisphere that is illuminated by the Sun is about $2\pi r^2$, where $r$ is the radius of the Earth. But the cross section of that hemisphere to solar radiation is the area of a circle of radius $r$, which is $\pi r^2$, half of the area of that hemisphere.


? Why do you need to average out the sun's energy over the whole planet at the same time when that's not what actually happens?

The Earth rotates fairly quickly, so that is what happens. If the Earth was tidally locked with the Sun, there would be one side of the Earth that would be very hot and one side of the Earth that would be very cold. That is not what happens.
If the Earth rotated once per month (which is what our Moon does do), the sunlit side would eventually come close to being in thermal equilibrium with the incoming sunlight while the dark side would cool to much colder temperatures than are experienced anywhere on the face of the Earth. That also is not what happens. Even the sunlit Sahara does not get as hot as do equatorial regions of the Moon, and even South Pole does not get as cold as do portions of the Moon.
The periods of daytime heating by sunlight and periods of nighttime cooling by the lack of sunlight are both far too brief to bring those portions of the Earth into thermal equilibrium with the sunlight at daytime or with the 2.7K cosmic microwave background radiation at nighttime.