Sure they had legal legitimacy. Everyone who wins has legal legitimacy. They didn’t win, so now they are not legit.
So going to war to force civil change is conservative? Granting citizenship to only the slaves in conquered areas is family values? Burning a town and killing women and children is Christian? Telling individual states they must abide by the Federal Government is patriotism?
Ending slavery is family values.
Making war is necessary, even for Christians. If you do not have a sword, sell your cloak and buy one.
Keeping the United States United is patriotic, if you are American and patriotic towards America. Lee was a patriot, of course, but he was a Virginia patriot, as an American, he was “rebel scum”.