The Union freed the slaves to destroy the economy of the Confederacy, nothing more, nothing less. There was no moral high ground to be taken by either side. Abraham Lincoln himself believed that the races should be separate and was a supporter of the idea going around at the time that all the non-whites should move to the central Americas. The economy of the southern states was, and still is, based largely on agriculture, and at the time, it wasn't automated like it is today. It was easy for the northern states to sit back and say that slavery was wrong, because they didn't have the need for large amounts of agriculture workers while also having a low population density (NOTE: I'm NOT saying slavery was a-okay, just playing devil's advocate a bit here).
I've found it interesting to read the opinions in this thread from people who don't live in the USA. We Americans tend to be incredibly (and understandably) polarized about the Civil War. No one can say that it was about this, or that, because it meant different things to everyone who fought in it. Some may have been fighting for or against slavery. Some may have been fighting for state's rights, or for sovereignty of central government, or just because they felt like the other side was going to waltz through and kill them anyway (ahem, General Sherman...). Like any other action, the intentions behind it are what need to be evaluated. Kid Rock says he doesn't believe the Confederate flag is racist, so to him, it's not. Some other people disagree and are throwing a pointless temper tantrum.