Many African countries are anyway struggling with money, and receiving a lot of foreign help. Having debt only makes their financial situation worse and increases the need for foreign help. So in a way, richer countries give money to African countries so that the African countries can give it back- this is not optimal.
Another reason is that a stronger Africa could buy more goods from other countries, and the economy of other countries would increase, too.