There are currently several hypotheses. Some say that it's just because it helps you lose weight, and obesity increases the risk of so many things. However while this is true, there are lots of examples where there are effects even when you control for weight loss. One of the more interesting theories is that it's down to their anti-inflammatory effects, because chronic inflammation is linked to so many conditions.