As I understand it, the original movie was written by a woman who meant for it to be a Christian allegory. They took it and turned it into a great movie.
But they wrote the sequels themselves and they sucked.
I read somewhere that it was based on this:
I don't know the true story of the movie's origins.