Drug pricing isn't transparent. The list price is publically available, but many manufacturers offer point of sales discounts or rebates. For some drugs the actual price might only be 10% of the list price.
This makes it hard for Medicare and Medicaid to know how much to reimburse. It's in the drug company's and the pharmacy's best interest that what Medicare pays is as high as possible, since the difference between acquisition cost and reimbursement is profit in the pocket of the pharmacy. It also benefits drug companies since that profit incentivized use and what do they care? It's not their money.
What the gov't does is require every drug company to report various prices. What is the average price the drug is sold at (inclusive of all discount/rebates)? What's the lowest price the drug is sold at? The gov't then uses this information to determine how much to reimburse.
Some of these companies simply reported the wrong prices to the gov't that resulted in inflated reimbursement. That violation falls under the False Claim Act (from the US Civil War) and the companies get sued for every pill they sold at that wrong price. So it adds up.