Given the absurd number of moving parts that comprise any movie - not to mention the tens or even hundreds of millions of dollars in play - it makes sense that most Hollywood productions are meticulously planned out and controlled down to the finest variable.
But that doesn't mean adventurous - or desperate - filmmakers don't figure things out on-the-fly, too. Sometimes a scene gets rejigged during shooting when the cast and crew realise it'll work better another way, or production constraints force them to change tack.
But usually a movie's ending is set pretty firmly in stone, because it's the last thing the audience sees before their their final impression of the movie crystallises.
Yet these filmmakers all threw caution to the wind, teeing up endings which caught at least one major cast member by surprise. Whether the change was made on-set or during post-production, the actors involved had no idea these closing moments were in the works when they came to work that day.
From directors who intentionally kept their cast in the dark to those who caught last-minute improvised gold, these movies all ended at least a little differently from what was on the written page...
10. Pearl's Insane Smile - Pearl
Ti West's Pearl lays claim to one of the most memorable endings to any horror movie in recent times, with the final image lingering on Pearl (Mia Goth) as she pulls an unhinged smile at the camera - a tear-soaked grin that continues into the end credits.
Yet according to Goth herself, this prolonged smile wasn't in the script, but was in fact something that filmmaker West came up with on the day of shooting.
West suggested that Goth try an experiment - smiling for an extended period while the cameras were rolling, simply to see what results they got.
There was no concrete idea of what West was going to do with the shot during post-production, but Goth simply committed to holding the smile for as long as possible, her face becoming increasingly strained while waiting for the director to call "cut!"
And yet, despite being something cooked up at the last minute, it's one of the most memorable moments in the entire movie.