Bob Gale, co-writer of Back to the Future, spoke about how Marty McFly's (Michael J. Fox) general good morality controlled the ending of the film. Back to the Future, directed by Robert Zemeckis, tells the story of Marty McFly's accidental trip back in time via his friend Doc Brown's (Christopher Lloyd) modified DeLorean. Back to the Future is generally considered one of the greatest time travel films of all time, with its rules and ideas about time travel influencing pop culture for years to come (even getting a reference in Avengers: Endgame).

In a shift that was different than most time travel movies, Marty doesn't choose to travel back in time. Marty ends up traveling from 1985 to 1955 in a complete freak accident. While not only worrying about how to return back to his original timeline, Marty is also forced to make sure his parents, George (Crispin Glover) and Lorraine (Lea Thompson) end up getting together, as Marty's presence in 1955 caused them not to meet when they were originally supposed to. The original ending of the movie had Marty return to a much more futuristic 1985, as 1955's version of Doc Brown got a glimpse of future technology via the items Marty had brought with him in the past. The ending was altered, and more focus was placed on Marty and his family, having them be the only thing that changes in the new version of 1985.

In an interview on the Russo Bros. Pizza Film School show, Gale spoke about how Marty's involuntary trip to the past was necessary to the ending of the film. Gale spoke about how many time travel movies are "cautionary tales." Their function is to show how interfering with the past to change the future is wrong. Gale mentioned that the original ending of the film was disliked. Gale and Zemeckis decided to change the ending, so Marty's family is the only thing that's altered by his trip to the past. Gale brought up how Marty's morality, and his unwillingness to alter the past in any way that could benefit himself (other than fixing the things he messed up in the first place), was important to the story and getting the audience to empathize with Marty.

As Gale mentions, Marty didn't go into the past voluntarily. Part of the reason Marty is such a likable character is because any changes he made in the past were made purely for his own survival. The writers made a conscious choice to stray from other well-worn time travel tropes, and have Marty's motivations be as selfless as possible. If Marty's morality would have been different, Back to the Future likely wouldn't have gone over as well as it did with moviegoers back in the '80s.

Gale and Zemeckis' meticulous story craft more than paid off in the final film. Its no wonder, given the amount of thought that went into it, that some argue that Back to the Future is a perfect movie. The film's story is crafted in a way that makes it feel almost timeless. While certain things from Back to the Future don't hold up by today's standards, Marty is still immensely relatable, and the film doesn't feel dated in a storytelling sense. The change in the ending was dictated by Marty's well-meaning nature and is definitely one of the reasons that fans still admire Back to the Future today.