Why does the focal length of a telescope have an effect on the magnification?
The objective lens of a telescope forms an real image of the night sky, the size of that image is in proportion to the focal length of the objective lens. The reason for this is simple geometry: If two stars are 1 arcminute apart, and the lens is forming an image of them, then the further the image is from the lens, the further apart the images of the two stars will be.

The eyepiece then magnifies the image. When using a lens to magnify you put the object at (or near) the focal distance from the lens. The shorter the focal length of the eyepiece, the closer you can get to the object and so the larger it appears. All this is a round about way of saying the the magnification of a lens is inversely proportional to the focal length. 

In the case of a telescope, the "object" being magnified is the image formed by the objective lens. Putting this together: the apparent size of the image is directly proportional to the focal length of the objective lens, and inversely proportional to the focal length of the eyepiece, and the constant of proportionality is 1 (just imagine that both the objective and eyepiece have the same focal length). So 
$$\mathrm{Mag} = \frac{L_o}{L_e}.$$

This might be a useful point to mention that magnification is usually the least useful function of an astronomical telescope. Their main purpose is to gather light.