As for the question, why were there still forms of slavery around in 1866?
Because some places didn’t secede from the Union and start a war against their fellow Americans to keep slaves.