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.
Zero has always felt a lot grumpier and less patient in X7 than in the other games (not helped by his VA's dry delivery). It's likely that his cranky demeanor is out of frustration with X's 10-Minute Retirement, or his own form of Heroic Fatigue where he is sick of the fighting too.