Companies often have programs that provide the drug free of charge (or at a nominal price) to people without insurance. They might also have “copay assistance” programs where they reimburse patients for their copay to bring the out of pocket costs down.
The goal is to maximize the amount billed to insurance companies. They’ll go out of their way to reduce the amount billed to the patient directly, because that results in more patients signing up and enabling them to bill more insurance companies.
It’s not a good system, but it’s how things work right now. Nobody pays that $100-300K price themselves. Well, we all do through higher insurance costs.