That's not true. Medicare can and does negotiate the cost of procedures and doctor's services. What the law says is that Medicare can't negotiate prescription drug prices. That's because Medicare doesn't directly pay for drugs, except what's used incidentally in the course of covered hospital stays.
Medicare didn't provide coverage for prescription drugs until the adoption of Part D. That is structured differently than other parts of Medicare. Instead of the government serving as the insurer directly, the government subsidizes premiums for a private Part D insurer. The private insurer can and does negotiate drug prices.
The fact that Medicare can't negotiate prescript drug prices is often invoked as a talking point, but Medicare prescription drug spending accounts for a relatively small proportion of. overall Medicare spending: https://www.heritage.org/medicare/commentary/good-and-bad-id... ("Consumer choice and competition have made Part D the rarest of government programs: one in which spending hasn’t spiraled out of control. In fact, government actuaries report that federal general revenue spending on the program was $67.8 billion in 2018—that’s less than what it spent in 2015 ($68.4 billion).").
That's 1/10th of the military budget for drugs that can be often be manufactured for pennies (drugs with biological elements requiring glass column filtration and such are a different story but are far more rarely used).
The manufacturing costs are irrelevant for new drugs. If the drug companies couldn’t sell them at a profit, they would never develop them in the first place.
There is an issue with some old out of patent drugs that costs a lot despite being very cheap to manufacture, but that typically has to do with FDA certification deciding who can be allowed to produce what, which is also expensive to obtain.
There was 10+ years of research prior, but much of that research was academic. Phased studies must be conducted regardless of whether manufacture is public or private. There does not appear to be any need for private profit, we are sufficiently motivated to research this stuff out of a desire for self-preservation.
I'll admit that profit seeking would work better* in a society that doesn't have a strong state or other coordinating body, but given that one exists to counterpose our existing system is not reasonable.
EDIT: * In the sense that products might be produced at all. Without a strong regulatory body, the market would be flooded with snake oil medicine and the average consumer would not be able to make heads or tails of things. This is because it's much cheaper to make a fake medicine than a real one, which is what profit optimizes for: the cheapest solution with the highest payoff for the seller regardless of costs not borne by the seller (such as death and destruction writ large).