Okay, so I stumbled upon this interesting blog from mental_floss regarding about the little trivia of how Marty McFly (Michael J. Fox) and Doc Brown (Christopher Lloyd) becoming friends in the first place. And I'm sure there are die-hard fans out there wanted to know this particular "mystery" behind the question surrounded in the 1985's BACK TO THE FUTURE.
Here goes... co-creator Bob Gale, who was responsible for the BACK TO THE FUTURE trilogy, have finally revealed the answer:
"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."
So there you go. That clears out any doubt after all these decades.