The angle is there to improve the intonation. If you've ever set the intonation on an electric guitar with individually-adjustable saddles, you'd see that the bass strings are slightly longer than the treble strings. This is due to the gauge of the strings: heavier strings need to be slightly longer than lighter-gauge strings. The B-string anomaly that you point out has to do with the fact that it and the high-E string are plain steel instead of wound, and so their intonation adjustment is different than for the wound strings. Still, though, because the B-string is heavier than the E-string, it needs to be slightly longer.
What Does String Gauge Have To Do With Length?
When you set the intonation of a string, you want the 12th fret harmonic to match the pitch of the string when fretted at the 12th fret. But when you fret a string, you increase both its length and its tension slightly. Given two strings of equal length, their fretted lengths will also be equal, so since the tension of a string is proportional to the product of its mass and its length, the heavier string's tension will increase more than the lighter string when fretted. Therefore the heavier string's pitch will increase (slightly) more than the lighter string's pitch when fretted. To compensate for this greater increase, the heavier string needs to be slightly longer than the lighter string.
Update: I'll just point out that if you look closely at the photo, you'll see that the saddle itself is carved in such a way that the point of contact for the low-E string is towards the back of the saddle while the point of contact for the G string is in the front. So not only is the saddle angled, but the strings contact the saddle itself at different points, increasing the differences between their lengths.