Why do LEGO bricks yellow at different rates?
There are several reasons for this:


There isn't just one formula for the ABS plastic that is used in
LEGO. There are actually quite a few. Depending on the color,
translucency, and function, the mix of materials will vary.

Translucent pieces are quite a bit harder and more rigid than other
Lego bricks. Mini-figure accessories tend to be quite a bit softer
than other pieces (so they don't cause internal damage if/when
swallowed). 

If you pull out several types of parts and pay close attention to
the hardness, flexibility, and stiffness, you will notice that not
all LEGO is made the same.  
Even for similar parts, there is variance in the chemical mixes.
When you get a set, it is highly likely that the parts weren't made
from the same batch of plastic. 

Mixing plastics with minor variations can cause changes in the rates
of UV damage and discoloration. It is really hard to get perfectly
matched colors across multiple batches of plastic. 

The fact that LEGO colors are so consistent is due to the fact that
they have really high standards for quality control.


Oh, and if you want to restore your set to that new pristine white color, you can treat it with retrobrite or oxyclean and hydrogen peroxide. There are plenty of articles online if you do a quick search for either.