It occurs to me that if something was wrong with Zero at the start, Wily (being true to his name) as a Avatar Of Evil (tm) might have jumped into Sigma just to get Sigma to rebuild/repair Zero...?
If that's the case, then Wily ended up like Light; unable to complete his last project. Instead of Light, though, maybe Wily was betting for someone to build a better robot to help finish his greatest creation. X5 seems to be the pinnacle of this, using the virus to make Zero stronger and to repair easier.
Of course, I think that Wily didn't bet that X was a filter for the virus. :)