So my question is, was the Abolition of Slavery in the United States perceived and advertised as an effort to improve race relations or an improvement to labour laws?
Others have given sociopolitical answers, let me give a brief economic one. The ultimate reason for slavery's actual abolition was, at least according to the economic history, an economic incompatibility between the plantation system of the South and the rapidly industrializing North.
Machinery was proving to be more efficient than basic labor in most fields and plantation farming was a system that existed because those who benefitted from it (rich plantation owners) perpetuated it. Of course, slave labor was more profitable than free labor, that goes without saying, but the contrast with the free labor system of the North furthered the image of a 'divided house.'
The divisions in the American psyche, and the nation, can be attributed to several factors, most notably the strong sense of individualism and states' rights which most Southerners held. The election of Lincoln provided an impetus for the secession itself. Lincoln's association with the radical Republicans and Northern abolitionist thought was too much of a challenge to the rigid social structures of antebellum South.
Ultimately it was the South's resistance to the North in principle that motivated President Lincoln to attack. It is very possible, that, had the South accepted a President Lincoln and remained with the Union, that abolition would have been delayed significantly. (Lincoln did not actively campaign against slavery, though was generally opposed to the idea of it.)
But, as the war continued, slavery became increasingly associated with Southern society, and consequently the Emancipation Proclamation can be seen as much of a war document as a document issued out of moral considerations. And in fact President Lincoln's authority was derived from its status as a war measure.
But race relations were most certainly not a consideration in the abolitionist movement. Not even abolitionists saw blacks as equals, nor would they for a very long time in American history. Some advocated for the relocation of freed slaves back to Africa, most notably leading to the foundation of Liberia. The Union, during the war, haughtily waged a moral war that ultimately was developed to support the war cause, not vice versa. Northerners of the time held as racist views of blacks, and in the decades to come, the powerful system of de facto segregation would be as effective as the de jure segregation of the South.
Rather, it was a moral wrong- that was the principle argument. And as for labour laws, these were actually in the process of being formed in the nineteenth century, but in fact the abolition of slavery, because of the longstanding tradition of separatism between "white labor" and "black labor" in American history, followed a completely independent track.
Now, to the socialist theory of racism, as you call it. Racist attitudes have pervaded the human psyche for far longer than chattel slavery in America became common. The in-group versus out-group mentality is well documented among humans, and appears to be more biologically rooted. (Anecdotally, it would actually be interesting to see how the past half-century, and in future centuries, human neurobiology changes with the dramatic social changes that have come and probably will continue to come.)
On the other hand, however, there is no debate as to whether slavery aggravated prior racisms, specifically in the American stream of thought. The association of black persons with the "peculiar institution," has affected American history ever since, from Jim Crow, to high incarceration rates and the dissolution of the black family.