If the light were large enough (i.e. wall-shaped) then that distance wouldn't matter either!
So for example, if you used a large, flat light box to illuminate a small object and shot it from the side, it would be nearly the same brightness 5 cm away from the box as it would be 2 cm away, and not ~six times dimmer.
Let's refer to @Rafael's answer and exploit the idea of pixels, and first think of why when we walk away from a wall it stays the same brightness and does not get dimmer per the inverse square law.
Each fixed size "pixel" (let's say one micron square) of the wall definitely gets dimmer per inverse square, but the number of "wall pixels" that illuminate a given camera pixel increases as the square of the distance so that the total illumination of the camera pixel (or "eye pixel") remains about constant.
Same thing with the "illumination pixels" of the light box; as our sample moves away from its surface the light from a given 1 micron square drops by inverse square, but the number of illumination pixels that contribute to say say a 60° or 75° cone of illumination on our object pixel increases as the square of the distance, so once again, the illumination remains roughly constant.
Once your light box gets far enough away that it stops filling that large cone of illumination, the object will appear dimmer and dimmer.
Likewise, once your apple gets far enough away that you can't resolve it, it will also of course get dimmer and dimmer per the inverse square law.
Why does the object have to be so far away as to be unresolved before it begins to obey the inverse square law, but the light box only needs to be a few tens of centimeters?
Because the object is (likely) a diffuse scatterer, so that large cone of illumination feeds each camera pixel.
If you apple was polished so much that you could see the directly reflected light from its mirror-smooth surface, then the only thing that would matter for the reflection's brightness would be whether the reflected (virtual) image of the light source as seen by the camera was resolved, or not.