People give money to African charities because they believe their money can do some good there. While a lot of people have the oppurtunity to be educated about and avoid sexually transmitted diseases, the horrific state of much of Africa leaves much to be desired. You’re assuming most Africans in AIDS-plagued countries have the same level of knowledge about the disease as we do in the West, which simply isn’t so.
While I don’t support government-funded charity, it doesn’t mean people suffering from AIDS are all idiots who take no precautions. It means they’ve never known what precautions to take, and have never really had an oppurtunity to find out.