At first, Matt Damon and Ben Affleck (it's so sad that there's no way to fuse their names gracefully—"Men" and "Batt" both sound just… bizarre) wanted to make a movie about a super intelligent kid from Boston who gets caught up in an FBI spy plot.
But after they brought it to Castle Rock Entertainment, President Rob Reiner told them to focus the movie on Will's relationship with his therapist, Sean Maguire. Now sometimes, production companies force people to make changes to movies that end up ruining them. But in this case, Rob Reiner made a good call. And what else would you expect from the dude who directed the film version of The Princess Bride?
After Reiner got his changes made, Castle Rock bought the script to Good Will Hunting for $675,000. The big problem then, though, was that the studio didn't want Affleck and Damon playing the main roles. Eventually, the writing duo got a different offer from Miramax, which bought the rights from Castle Rock and made the movie the way Damon and Affleck wanted to make it.
A little while later, Damon and Affleck hired Gus Van Sant to direct, and the rest is film history.