I will take a stab at this. That line is what is called an import statement in Python. This basically tells python to go load all the modules in the arcpy.sa path.
Here is more about the important statement:
Here is the path that Python know about to load the modules if you have a default install:
C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\sa
So in short that statement just tells Python were to find the spatial analyst classes that you are using in your Python file.
Here is a pretty good explanation from the technical side.
The reason you received an error without it is that Python did not know where to find the class you are trying to use.