I think you are aware of this, though perhaps you haven't connected this up explicitly with microeconomics. Now, when you think of discrimination, you probably think about discrimination based on race or gender. Everyone agreed that people should be hired or fired simply on the basis of their productive contribution. Let me give you another example. There is a lot of debate about how big a factor test scores should be in admissions to college and graduate school.
Many people argue that test scores are a better measure of merit than anything else.
I can tell you from personal experience that if the Economics Department rank-ordered graduate school applications by GRE scores and admitted the top 12 students on this basis every year, we would have no American students. Foreign students are being explicitly discriminated against. And profit maximization is pushing companies to do just this. We don't know exactly what the consequences will be. The more education you get, the better protected you will be.