Because western imperialism from English speaking countries has been around for at least 500 years and it's given lots of countries time to learn it.
But also I make sure to know how to introduce myself and ask if they speak English in basically every language I interact with as to not start with it. And then I have conversational understanding of about 7 languages.
Historical though, the French had many colonies in Africa. That's why many parts of Africa already speak French, or at least their own dialectic of it.