Answer:
Because they got to trade the slaves for items they needed (e.g.) firearms, materials (etc.). So the Europeans didn't have the power to just march in and kidnap Africans to make them slaves, so they provided a trade that would benefit both parties, the Africans got materials they needed and the Europeans got the slaves.
I hope this helps.