Why do the spaces between frets grow narrower down the neck?

The spaces between frets on the neck grow narrower the closer to the body they are. Why is this? Each time you move one fret away from the body, the pitch increases by a semitone. A very simplified way to calculate how much a string should be shortened in order to raise its pitch a semitone is to take the original length of the string and multiply it by 0.944. Therefore, the amount that the width must by shortened to increase the pitch a semitone gets smaller the higher you go in the range (i.e. the shorter the vibrating portion of the string is), and the space between frets get narrower.
Of course, this is only a theoretical number. In reality, a variety of factors (such as tension offset) must be considered and a much more complicated formula is used to calculate the positions of frets.