But perhaps with the exception of Delaware, there were significant struggles within those states. Factions in Missouri, Kentucky and Maryland wanted to go with the South.
Of course, Lincoln freed all the slaves, except in those states. It was purely political. If it was due to a moral opposition to slavery, the slaves in those states would've been freed first.