There have been many conspiracies but mentalfloss.com decided enough was enough and asked BTTF Co-Creator Bob Gale.
Turns out it’s not that much of an amazing story but a solid one I give it that.
Here’s what Bob Gale had to say:
Okay, from the horse’s mouth (yes, I’m the horse — er, co-writer, co-creator): We never explained it in the movie. But the history of the characters that Bob Zemeckis and I created is this…
For years, Marty was told that Doc Brown was dangerous, a crackpot, a lunatic. So, being a red-blooded American teenage boy, age 13 or 14, he decided to find out just why this guy was so dangerous. Marty snuck into Doc’s lab, and was fascinated by all the cool stuff that was there. when Doc found him there, he was delighted to find that Marty thought he was cool and accepted him for what he was. Both of them were the black sheep in their respective environments. Doc gave Marty a part-time job to help with experiments, tend to the lab, tend to the dog, etc.
And that’s the origin of their relationship
However (geek alert), when Marty went back to 1955 and met the Doc, surely this would change the way Doc looked at Marty when he first caught Marty (aged 13-14) in his Lab, as he would have already met the future Marty back in 1955 and thus would have wanted to be good friends regardless of if ‘he was cool’
Sorry for confusing you! Its still one of the best films EVER made.