According to [1] "the estimated median capitalized research and development cost per product was $985 million, counting expenditures on failed trials." That billion dollar figure is risk adjusted per product meaning that's the cost of all R&D and clinical trials against the number of products that hit the market. A lucky startup can pull off a successful trial for a few hundred million (i.e. Sofosbuvir), if not tens of millions for an orphan drug.
The most expensive ("oncology and immuno-modulatory drugs" which are similar in complexity to HIV therapeutics) come in at a median of $2.8 billion and a mean of $4.5 billion but only because of an extreme outlier, Dupixent, which cost over $6 billion to develop. Dupixent costs $40k/year and has a much larger target market than this HIV treatment (IIRC on the order of 10 to 100x). This HIV injection is far more likely to be discounted in the developing world so the sticker price likely reflects that too.
A $5 billion a year budget can go very far and the people should get the rewards for taking the risk, especially for a disease like HIV that has significant quality of life impacts on vulnerable populations.
[1] https://jamanetwork.com/journals/jama/article-abstract/27623...