For someone who grew up in Africa, Cady seems pretty ignorant. Sure, she was lonely and scared going to school for the first time, but assuming the black students in the cafeteria speak Swahili is the sort of casual racism you'd expect from someone who doesn't realize that Africa is a continent with many countries and many languages. There are an estimated 1,500 to 2,000 languages spoken in Africa, so even if the students were from Africa, there would be no guarantee they'd speak Swahili. According to U.S. census data, there are fewer than 100,000 Swahili speakers in the country.
There's also the fact that Cady would assume these students were from Africa to begin with. Did her parents not teach her any American history when they were homeschooling her? Does Cady really have no idea that most African-Americans are descendants of African slaves who were kidnapped and sent across the ocean centuries ago? It seems like a pretty significant detail to have been omitted from her homeschool curriculum.