The classic inverse square law is in effect defined by the conservation of energy. For a radiating point source (zero dimensions) the energy density falls off in proportion to the increase in the area of the surface that surrounds the point. This increases as the square of the radius that is one less than the three of the dimensions of the volume.
There is an interesting extension to this relating to the dimensionality of the source and the space that applies generally.
For normal three dimensional space the radiation fall off from a one dimensional (long line ) source falls of as the inverse of the distance and the fall off from a large plane source is zero. this can be demonstrated by visiting the empire state building. The basic rumble of traffic noise(excluding of course very local noise sources at street level) is the same at the top of the tower as in the street at ground level because you can hear noise originating from a much larger area of the city.
This concept also applies to world with higher numbers of spatial dimensions than three.