Because they added the exact amount of extra pixels needed.
Think of it this way: They put the same old 4S retina screen in the middle of the phone and then added a smal retina strip on top and a small retina strip on the bottom.
That's not literally how they do it, but that's the basic theory. The DPI has not changed.