For the purposes of apportioning the House of Representatives. This has nothing to do with the humanity, or lack thereof, of the blacks.
In fact, it was a way to punish slave states by reducing their representation in the House. The slave owners wanted to count the slaves at 100% to increase their House delegations.
But you're kidding, right? You already knew that.
Makes no difference. They were not legally a whole person - for whatever reason, it doesn't matter. See, they just make it up as they go along.