A great idea
Back to the Future: Part III sees Marty travel back to the Old West in 1885 to save Dr. ‘Doc’ Emmet Brown (Christopher Lloyd) from an early grave, and Robert Zemeckis has Michael J. Fox to thank for the movie's setting!
On the set of the first film, the director asked Fox what time period he would want to see with his own eyes if he had the chance, and the actor said he’d like to visit the wild west and spend time with cowboys.
As a result of that conversation, Zemeckis started to toy with ideas for what would become Back to the Future: Part III.