Sure they fund research, but how many of these governments and charities actually work on the final end product.
The research they are doing is generally not in the final phase of actual development of the drug which is where it gets incredibly expensive.