They keep their processes secret instead under the current system, achieving a "trade-secret" like result for some drugs. For some drugs it achieves the same thing because finding a practical economic synthesis is the hard part rather than coming upon a small bit of chemical that is proven to be effective. For others it wouldn't matter whether you kept it secret or not, someone would isolate and characterize it and reverse engineer a practical synthesis.
The biggest value protector arguably of the patent-FDA approval process is on the FDA side, who create massive barriers to entry that mitigate close unpatented chemical competitors from outside the pharma oligopoly from competing.
Is the patent not for the synthesis route itself, rather than the drug? Someone can't just plop down a chemical formula on a piece of paper and patent that, can they?
I'm not really happy with the current system either - I tend to think that the state should just mandate that all medical research be fully published, and either have companies compete on research and manufacturing, or pay for it directly if it can't be made to work as a private business. My point was just that this is very much not a capitalist or libertarian position.