Why has the «inverse square law» has nothing to do with photography?
Actually, it has everything to do indeed, but it is often (always?) misquoted.
The inverse square law is a law of physics that tells, basically, that the intensity of light decreases in proportion of the distance, squared, between a point-like light source and the subject being illuminated.
In photography, this law is often misquoted: you will find this explanation in tutorials involving light modifiers (widely used in studio photography: softboxes, beauty dishes, reflectors…) or flash photography more in general, always with the following intended meaning: the light gets dimmer if the distance increases. Of course, this statement would be perfectly true! However, the inverse square law does not just say this — does not simply say that the intensity decreases — but it also says — exactly— of how much it does so: in proportion of the squared distance.
Now, the whole purpose of using light modifiers in photography is that of modifying the look of light, that is, modifying the way it falls off with the distance across the subject. A face, for instance, is a three-dimensional shape, and perhaps the nose will be closer to the light than the ear, and this difference will create shadows and different shades of light. These shades will be a direct consequence of how fast the light falls off. If the light indeed always decreased with the squared distance, then there would be no reason at all «modifying» the light, because we would always get the same result regardless of the modifier employed on the strobes.
So, is the law wrong? of course, it is not. The law talks of a «point-like» light source, that is something that could resemble a small light bulb kept far away from the subject: a source that emits light in all the directions. Photographers know very well that usually this kind of light illuminates the subject in a rather unwanted and unflattering way (it creates strong and deep shadows), and this is the main reason they use light modifiers: «violating» the inverse square law, that is, slowing down the fall-off of the light. A squared-distance fall-off is quite rapid (in space) and creates large differences of intensity even with small differences in distance from the source (the eyes, the ears, the nose…). A light modifier firstly makes the source look bigger (e.g. a 1m x 1m softbox), secondly it throws the light in one direction only, certainly not behind itself. These modifications modify the light fall-off to a softer, slower (with distance) one, where the light does not decrease with the distance squared but with a «speed» closer to that of the linear distance.
In other words, if the inverse square law was always true, there would be no reason in trying modifiers. Even a simple flashgun, with a typically small light source, is not point-like because it does not emit in all directions but rather throws the light preferably in one direction only.
The sun, on the other hand, is so far away that a few centimetres (or even meters) of difference of distance with the sun are irrelevant in comparison with the distance Earth-Sun. This is why a person does not becomes brighter if she stands up and gets closer to the sun! One the contrary, an artificial light source, point-like or not, being certainly closer than the sun to the subject, will have its intensity vary with the distance (not squared, probably, but certainly to some degree).