Original ending
After finishing the script, Frank Darabont was not satisfied with the final scene being Andy and Red's reunion, and so suggested a different ending.
The director wanted the last scene to show Red getting on the bus and driving off into the sunset, presumably with the intension of reaching the field Andy talked to him about.
However, the studio was not happy with the pitch.
Eventually, the two parties came to a compromise, and so the movie ends on the uplifting moment where Red and Andy reunite from a distance on a beach.