Yes, the square function is just indicating that for every distance you move away or to the 'object' it is not directly or indirectly proportional but increases or decreases by the square of the distance.
It's the way nature is...Its physics!
For instance if you measure the power to a radio receiver at one distance then move back that same distance, or double the distance away, it will not be 1/2 as strong but but a squared law function. Like -2,-4,-16,-34 for the same increment of distance away.
A Lot of things are like that in nature. Light, gravity, forces, radio wave strengths, tidal waves, even my voice level when I scream at students.
There are more functions than just linear functions. If you take 2 poles of a magnet that are 4 feet apart and measure the attractive force, like berkman suggested, then moved the 2 magnets 2 feet apart the strength would not have doubled but would have gone up by a factor of 4 times and so on...
I would suggest that you study linear functions (step), logarithmic functions (exponential) and then the square functions, to name a few.
After you do, tell us what kind of function a coil spring exhibits pushing or pulling the same increments of length, the answer might surprise you!