Answer
Let's suppose that the length from the bridge to a certain fret is $L$. The distance from this fret to the next fret should be $\frac{L}{16}$. As we continue placing frets like this, the length from each fret to the bridge becomes shorter. Therefore the value of $\frac{L}{16}$ decreases as we move up the fingerboard. This is why the frets get closer together as we move up the fingerboard.
Work Step by Step
As we move up the fingerboard of the guitar, each fret is placed so that the tone produced is a semitone higher musically than the tone produced by previous fret. To produce a tone that is a semitone higher, the ratio of the lengths from the bridge to each adjacent fret should be approximately 15:16.
Let's suppose that the length from the bridge to a certain fret is $L$. The distance from this fret to the next fret should be $\frac{L}{16}$. As we continue placing frets like this, the length from each fret to the bridge becomes shorter. Therefore the value of $\frac{L}{16}$ decreases as we move up the fingerboard. This is why the frets get closer together as we move up the fingerboard.