Movies can undergo changes from the moment they're greenlit, right up to the point when the final cut is about to hit the can. Studios often bring in last-minute alterations, from casting changes to extensive reshoots, usually with varying results.
There are numerous examples of these 11th-hour changes paying off. Would Back to the Future really have been the same movie if Eric Stolz had played Marty McFly instead of Michael J Fox? And surely nobody would have taken The Terminator seriously if they'd given Kyle Reese a cyborg canine sidekick as originally planned.
When a studio or director switches things up so late in the day, the outcome of these changes can go either way, and it's often the case that they ruin what would otherwise have been a great movie. Last year's Justice League is almost a good example of this. Warner Bros made multiple changes to the superhero team-up during post-production and the end result was a Frankenstein's monster of a movie, a mish-mash of conflicting ideas from two different directors, Zack Snyder and Joss Whedon.
That said, we'll never know whether Snyder's original cut would have been superior, but there are plenty of examples of films that would have been better off without their last-minute changes.