Think back to the ending for the final game.
"Since you disappeared I've been fighting this war alone against an uncountable number of Mavericks for nearly a hundred years... Battle after battle... So painful and so sad... But the hardest part was when I discovered that I no longer cared about fighting enemies..." -X
Who's to say Zero's dream wasn't about that? Even if he ended up not being there to do anything, he still foresaw that it would happen.