The primary purpose of the Constitutional Convention was to forge a political union, not a moral one. Many of the delegates at Philadelphia were hostile to the very notion of slavery. Gouverneur Morris spoke for many when he described the peculiar institution as "a nefarious institution—It was the curse of heaven on the States where it prevailed." A number of delegates from the South concurred. On a moral level, slavery was virtually indefensible despite numerous attempts at Biblical interpretation, whose novelty was matched only by their mendacity.
But despite the prevailing strength of opinion against slavery, there was a widespread consensus that it was impractical to abolish the institution outright. In order to forge a viable political nation, it was necessary to keep the Southern states on board, and that meant that some kind of compromise was inevitable. The compromise that emerged—the notorious "three fifths" clause—was an attempt to balance the political interests of slave states and free states.
As the apportionment of seats in the House of Representatives was based on the level of population, the southern states wanted slaves to be computed as citizens. This would give the South greater power within the American political system. However, the North reacted strongly against this. Slaves didn't enjoy the rights of citizens, so why should they be counted as such for the purposes of computing the number of state representatives to the House? The ensuing compromise—each slave would be regarded as three-fifths of a person—showed that the delegates to the Convention were prepared to sacrifice the human and civil rights of black people in America in order to build the new nation.