During the Buddha’s time, people would go to the Buddha and report bad behavior or inquire about the karmic cause that led to a particular result. The Buddha, being able to see the past lives and karma of all beings, was often asked to tell these past rebirth stories (Also known as jatakas stories). Seeing the commonality and causality inherent in the issues, people would then realize and cease doing evil or even proceed to achieve a level of enlightenment. Wat San Fran is proud to share their favorite Jatakas with you (75 in all).
My understanding is that his hair became that way after his enlightenment. He is perfect. Monks who chose to follow him, after he was persuaded to begin teaching, shaved their heads in acknowledgement of their path, their devotion and their commitment to the Buddha, The Dharma and The Sangha.