I kept coming back to one thought while reading this: why are people so mistaken about Africa in particular? The article covers misconceptions all over the place, but it keeps coming back to Africa, and it seems that the disparity between what people think and what's actually the case is far larger there than anywhere else.
It would be easy to blame this on casual racism and move on. And I'm sure that's a factor. But there must be more.
I wonder if there might just be a cliff effect in people's perceptions. The perception of China, for example, changed rapidly from "shithole" to "where all our stuff is made". India quickly switched from "shithole" to "where our IT gets outsourced". (And reminder, I'm talking about perceptions here, specifically in the US, or possibly the western world as a whole.) I wasn't around for it, but I have the impression that more or less the same thing happened for e.g. Taiwan and Japan.
If that's the case, then Africa is still in the "shithole" perception category simply because we don't see much of them. Not much of our stuff comes with a "Made in Kenya" label on it, and our experience with IT-related outsourcing to Africa is mostly limited to Nigerian scammers. Once that changes, the perception will rapidly go from "those guys have no food" to "those guys are taking all of our jobs".
A counterpoint would be South America, which is not overall perceived as "shithole" but nor is it a place we interact with a whole lot.
Perhaps it's just mental inertia. The places that are changing most rapidly will be the most incorrectly perceived.