The surprise bill exposed how insurance rules can still leave Americans paying for costly prescriptions.