The south was conquered and treated as a conquered nation. Reconstruction installed puppet governments and probably caused more racial animus than anything else.
The way I see it, the war simply established that might makes right and nothing else.
There was no chance Lincoln was going to allow the South to fire on federal property and troops and leave, none.
It is laughable to claim that the hatred for the former slaves was the result of the federal occupation. It would have ended much sooner had not the Freedmen and Republicans been attacked throughout the South. There were thousands of murders prompting the laws against the KKK and other killers.