Why was Slavery Abolished?

It doesn’t really take a genius to figure out why slavery was abolished. For one it is immoral to sell human beings to work for free under cruel conditions.