That is likewise with discrimination and protected classes. In economics everyone is considered an interchangeable rational economic actor. Not considered is that in reality some people are hindered from freely entering into contracts because one party is refusing the other party on the basis of religion, skin color or sexual orientation. Thus we see populations like the LGBT or racial minority communities generally having a worse perspective when it comes to employment, income levels, educational attainment, health care access, etc. Laws like the Civil Rights Act or protected classes try to mitigate that, albeit not always with complete successful but it still definitely helps.
/ Pragmatic and consequentialist libertarianism.