Because it was a political compromise, to phase out slavery rather than trying to end the whole thing all at once. Slavery was hugely lucrative, and with Napoleon across the channel, nobody was willing to risk loosing the revenues from Caribbean sugar, or the white planters revolting.
I don't know the details, but I suspect that it was the same kind of awkward compromise in the USA.
To whoever downvoted me, can you please explain why? I'm not complaining, I'm just wondering what's wrong/inaccurate with my question.