I used to think Africa was a country for a long time, which is strange because I always knew Africa is a continent. Logically how can one country be also a continent? Impossible. Even so, its one part ignorance, another part of not caring, and another part of just not knowing. Especially in America, when non-Western countries are not studied or focused on that much in grammar/grade/elementary/middle/ and high school. Usually as part of the school curriculum American students learn about American history and European History and that's it. Its only when you get to higher education level that you begin to understand that Africa is not a distant country but a continent that contains several different and unique countries and cultures. The only way around this issue is education (not that shitty public school stuff) but something of quality and significance.
Also sometimes its just by accident. Sometimes people refer to Africa as a country, even though they know it contains several countries. I am guilty of this too. Especially if you are talking about Africa. Its the slip of the tongue reaction of years of thinking of Africa as just a country. Its a bad habit that can't seem to get rid of.
Lastly I blame the media and the education system (especially in America). The media always portray Africa as a problem area filled with disease, civil war and poverty/starvation. No matter if its South Africa, Rwanda, South Sudan, Ghana, etc. Its just this one big place with no unique identity (according to the media). You also see this with the Middle East. To be quite honest I never heard of Iraq or Iran until the early 2000s with the War in Iraq and the various problems in the Middle East. The media loves to paint a picture of "3rd world countries" always in trouble and need intervention from the West.
Also the education system in America is outdated (among other things). Simply just learning about the pg version of American and European History isn't enough (especially for minorities). America is this vast multicultural, multi-ethnic country and its sad how many cultures and countries are not being recognized and acknowledged.
Even so, there has to be understanding on both sides. I don't think most people intentionally mean to be ignorant and keep saying that Africa is a country. Sometimes people just don't know better, sometimes its a habit, etc. What I don't like is people attacking someone for their ignorance? Teach/correct someone politely (not arrogantly). :)