My project in University (and now my company) annoyed a lot of companies when we first published DrugBank in 2006. We basically opened up the data on potential APIs and their targets into a downloadable and useable data set. I remember going to conferences and being both lauded by academics and maligned by pharma folks. This was before Wikipedia or things like Pubchem and ChEMBL were really a thing.
Much of the information about existing drugs was organized, but within textbooks (Merck manual, etc).
It had never been systematically structured and organized online (but likely internally within pharma). The data was (is) manually curated, included off-targets and potentially new targets, along with a suite of deep chemistry features and spectra that linked small molecules to their targets. In addition it was really the first place to organize biologic drugs, with their sequences (largely extracted manually from patents).
DrugBank was all part of a larger goal, which was to decipher the human metabolome. However, it turned out to be more successful that than (http://www.hmdb.ca is the current version of the human metabolome database, something I was also intimately involved in).
In terms of how we make money, we sell access to additional manually curated datasets (with the help of a bunch of NLP stuff for initial extraction and for QA). These datasets are structured for ML applications and integration into pharma pipelines or medical software. Additionally we sell access to an API that provides advanced queries useful for drug discovery, repurposing, and generally looking up drug information in a more uniform way. We focus on developer happiness, good documentation, and speed. Even just getting a drug product list from various jurisdictions, and keeping it up to date, is a surprisingly hard problem that the API solves.
However, keeping the data open and available for academic / student research, as well as publishing and updating drugs through the website is something we love. It's been nice to find a balance where we can get out of the cycle of grant funding but still offer something to the community and general public.