Yes, very few countries in the world do anything for free but the USA doesn't have to spend hundreds of millions of dollars and send thousands of troops to West Africa in an attempt to prevent the spread of the virus
They could also say " this is an African problem and we are closing our airports to anyone flying in from the affected countries. We will allow entry to the USA when Africa has resolved this crisis"
So people in Africa could also learn to be grateful for the assistance from the USA instead of questioning the motives
Again, states don't do things for free. Particularly powers like the US, they aim to get something out of this, either at home or abroad. Or simple a case of realizing it'll hit their borders and kill The Wrong People. Doesn't hurt to think about it even if pragmatism commands that you accept the help regardless of ulterior motives.