Freeing the slaves was not the original goal of the Civil War, it became a fundamental aspect of the Union's war efforts as the conflict evolved.
I know that slavery was present in many other parts of the world, but I don't go around saying that these times were actually great.