Yet even when a script is deemed ready for production, it is sometimes subject to last second changes, and some movies start shooting without the ending written. Sometimes expensive sets burn down before shooting is complete, necessitating rewrites. Sometimes bad weather interferes with the shoot. Sometimes actors throw tantrums or even go on a personal strike because they think a scene makes them look bad or they don't think they got enough lines. Sometimes the budget runs low.
In one notorious case, Jamie Foxx refused to finish a location shoot in the Dominican Republic for the ending of the movie adaptation of Miami Vice. He had just won the Oscar for Ray and decided he didn't need to do anything he didn't feel like doing. To be fair, there had been gunfire on or near the set, so there was a question of safety. Having to rewrite the ending seems to have diminished the end product. I was disappointed because I like the world of Miami Vice, but I struggled a little with the casting of Colin Farrell as Crockett anyway.
I search for comparisons to my own creative efforts. I have many stories, essays, drawings, and paintings that I never finish. They are stuck in development hell. Some eventually get finished but many seem to be dead ends. I usually like the ones that get finished though.