Forks can happen for a number of reasons, Usually they occur because of disagreements between the development team these disagreements cannot be settled and often lead to a split (Sumo / RYO spilt). Sometimes greedy developers will create a fork just for personal enrichment. Forks also occur to prevent things like Asic miners from creating an unfair advantage over GPU miners (Monero for example). Sometimes their a necessity other times they're not (Bitcoin cash). Forks can also occur if a mining pool with majority of the hashrate somehow loses consensus, a fork will occur.