Have you ever colored your hair.?  Dyeing it black, red, brown for example.
no but I am curious
If you are curious perhaps you should start with a natural dye.  It's plant based so less harsh.
What causes this?
The natural color from things like berries, bark give off a color to the hair when applied.