That makes no sense. The winner isn’t necessary right....they just happened to win.
No, it actually does make sense in the case of a revolution. If the rebels win, then there exists a new country based upon the idea that secession was justified in this case. The only people left standing are the founding fathers of the new country and they say so. If they lose, the definition of who is the "authority" remains unchanged, and of course that "authority" finds the rebellion UNjustified.
You hear the sayings "The winners write the history books" and "None dare call it treason [if it secedes]", which are kind of glib, but they're stating that same basic truth.
The idea is that winning allows the winner to say what's legal and what's not, because they're writing the laws. The American Revolution was certainly illegal under British law and the Founding Fathers had no doubt that they'd have been hanged had they lost.
Revolution is literally the destruction of the old social contract, putting people back in the "state of nature." From there, a new social contract and government should arise.
It makes sense from the perspective that there is a righteous revolution of the masses in which a significant portion of the polity opts into the revolution. Victory is confirmatory of the fact that the revolutionaries were in the right.
The winners of wars get to dictate history.