With all due and overdue respect to The Matrix for its position that deja vu is a glitch in the computer simulation we are tricked into believing in life, I hold that it's nothing of the sort.
I see it as just like a checkpoint in video games. It shows you that you have done the right thing and gotten it to autosave. When you experience deja vu, you have just beaten one of life's missions. Or failed it and are now set down a branching path to the bad ending. Either or. It would be nice if this could be confirmed by an "achievement unlocked" bling sound. And even better if you could go back and re-experience it via Lego-style free play.