Part of the reason for that is that Medicare is forbidden by law to negotiate prices the way other insurance companies can as a result of the GOP's Medicare Prescription Drug, Improvement, and Modernization Act of 2003.
It can't be much of the reason, because prescription drugs are, contrary to popular opinion, actually a relatively small component of US healthcare spending.