There are two reasons:
1. Discovering new drugs costs terrifying amounts of money
2. Everyone wants to make vast profits
the new stuff is expensive because only 1 in 10 or so of new drug applications succeeds and it can easily cost a billion dollars to get a drug from discovery to market. Once it’s patented you have 15 years or so to make bank, and that includes the time for trials (which can easily last five years.) the need for return in investment there is obvious.
point 2 is more the stupid inefficiencies and massive markups that happen. Ten quid for a bottle on iodine scrub that costs pennies. The same thing happens in military acquisition, I’m told. If you have the layer of insurance companies making profits like the USA, that profit comes from patients. In single payer systems like the Uk it comes from massive inefficiency, stupid, stupid commissioning decisions and no leverage - we have no leverage to force companies to give us drugs cheap. The only way you could is by saying to hell with patent law and creating a nationalised generics industry, but that of course means you’re on a road for trouble in terms of freedom and IP protection.
Some drugs are expensive as well because they’re hard to make, but most can be made reasonably cheaply, it’s the need for IP protection, profits at every levels and the bloated industry that surrounds it all.
We should not be leaving stuff like vaccines for pandemics and new antibiotics to single companies - there should be global initiatives to manage these for the good of the Earth (apologies for sounding a bit like a commie there, but it’s true...)