I would say that there are several reasons.
An intentional nod to a previous director of a famous movie. The Nosferatu reference above is an example.
An historical statement - Apocalypse Now vs The Heart of Darkness
Unintentional or in the imagination/vision of the viewer. ex: The Fly
Other times it is a joke. The Seinfeld TV show writers had a lot of fun with this. https://www.youtube.com/watch?v=NFuBaRiKwD4
https://www.youtube.com/watch?v=NFuBaRiKwD4