Some of the main reasons for it would be covering gray or white hair, be fashionable or even to restore hair due to hairdressing discoloring or sun bleaching.
Most people dye their hair to hide gray. I did it to hide my blonde hair.
My younger daughter hair once had blue hair! She loved it! Sounds interesting, does she partake a lot in hair coloring or the practice of changing her hair color? No, it costs a lot and she's always changing her mind you know. I don't really get the purpose for it either.
The main reasons for this are cosmetic: to cover gray or white hair, to change to a color regarded as more fashionable or desirable, to restore the original hair color after it has been discolored by hairdressing processes or sun bleaching.