what most medications actually cost. Why should they? They are not the dispensing pharmacists.
Plus, as someone else has already pointed out, how can they possibly know how much of the cost your particular health insurance will cover?
In a similar way, our crazy way of paying for health care means that it can be difficult to know ahead of time what you'll actually be billed for some procedure you get in a doctor's office, at a lab of some kind, or at the hospital. Again, different insurance companies have negotiated very different payments for each and every procedure, and the person administering the procedure has nothing to do with the billing.
And the health insurance companies have absolutely no interest in making anything any easier for anyone. There is absolutely no reason, given computer technology at this point, why your insurance card can't just be swiped at the hospital, doctor's office, pharmacy, whatever, and what you have to pay will pop up immediately. But the insurance companies prefer to have everything as opaque as possible, and are really in the business of avoiding paying.