I wouldn’t say North Africans countries are exactly “better” than their Sub - Saharan counterparts. Although they too suffer from mass corruption and poverty, they are differently in a better position. Due to many factors involved, better leaders (somewhat I suppose) for example, Morocco for example gets billions of dollars of support from the EU, just to keep out Africans from using their territory to get to Europe.
Egypt on the other hand influence, come from the fact they are the guardians of the Suez Canal, the importance of that region is self explanatory I’m sure. And most importantly, for the protection of Israel. They receive billions of dollars in cold hard cash and military hardware, every year. Just so they don’t break the peace deal that was signed not too long ago. Hence why they have become an important geopolitical partner for the United States and the EU. I’m sure there’s many other factors involved. But in saying that, with all these financial and military contributions, their economy is a joke. I’d argue without these contributions, they’d be another Sudan, it's not that they are way better it's more that ssa is unique in