There are only so many ways to end a movie. Movie endings that genuinely throw the audience for a loop are difficult to achieve since almost everything has been done before. Characters repeatedly experience their past lives, use magical powers to defeat their enemies, and reveal true villainy after a full two hours of pretending to be the good guy again in cinema.
Most of the best twist endings have occurred more than once. Multiple popular films use the trope of the lead character being expired the whole time, and plenty of movies have flipped the script on a haunted house with the revelation that someone has lived in the walls all along. If these twists are done correctly, they work, even if viewers have seen it before.
The worst plot twists, those that come out of nowhere, tend to fall by the wayside, but the best twists pop up again and again. Some of these plot twists that were ripped off have had enough details changed to make them feel new and, occasionally, they work even better than the original script.