Scientifically, the reason it happens is something like short term memory being confused with long term memory. Something like that.
What bugs me is that it totally fucks with my perception of reality. My brain keeps telling me "this exact thing has happened before", but I know that's not the case.
I just saw a something on twitter that feels like I saw it before I even had an account there. Then the same thing happened for me realizing it's just Dejavu, and getting annoyed by it. Then looking at the tweet above it, and getting even more annoyed that I remembered that as well. I even remember switching tabs over to Phuks so I can complain about it, but luckily that's where it stopped.
But it never fucking happened, and it drives me so fucking insane. Whoever designed the OS for the human brain needs to patch this right now or I am going to lose it.
Mine is usually linked to dreams I've had, and sometimes the dream could've been years ago.