Koo Koo,
In addition to a charitable foundation being able to add to the advocacy on behalf of a specific drug, some foundations provide substantial financial support to drug companies to support specific points of their research agenda.
For example, the Cystic Fibrosis Foundation* provides grants to advance the research in their field. Many of the CFF's grants are conditional, such that the CFF - if the drug is ever successfully commercialized - gets a specific portion of those revenues. I believe CFF hypothecated the future income stream of one approved drug about two years ago and received a lump sump payment of over $1B from the purchaser. CFF has also provided such a conditional grant to another entity in which I am invested: Savara Pharma (privately held, unless and until their reverse takeover of MSTX-Mast Therapeutics happens), in support of their Aerovanc drug.
*My interest in and familiarity with the CF space was based on one of our kids having been diagnosed with CF at age 11, after an extensive effort on our part to find out the cause of our kid's cough and chronic illness, and a generally inept medical establishment.