FACTS:
Maryland AND Delaware remained slave states throughout the war.
The much-vaunted “Emancipation Proclamation” freed the enemy’s slaves, NOT those of the northern states which still allowed the practice. Delaware was the last to change its laws, black slaves were still held by several indian tribes for year(s) after congress declared the practice illegal in Dec. 1865.
Lincoln couldn’t prosecute a war against slave-holders without slave-holding states to tote bails, haul barges, grow crops while federal soldiers were away from their day jobs for four years.
Now re-ask your question.
Kentucky and Delaware remained slave states until the XIII Amendment was ratified. Maryland ended slavery, by legislation, in late 1864.