A combination of genetic predisposion (for example crohn's is more common in ashkenazi jews), life events (eg appendectomy
increases one and decreases the other), and environmental influences (eg smoking
increases crohn's and decreases severity of uc.
..). Bet you didn't expect the latter! as knowledge increases more precise factors are identified.