Person A does not ask for a rise after one year; Person B asks for 10 dollar rise after one year.
TBH I don't see how it is a company fault.
It does not matter what the "reason" is. It does not matter if the bias is because equally skilled women merely ask for raises less often.
If for any reason at all, you are systematically underpaying certain groups that are equally qualified and equally productive, you are legally liable and the onus is on you to fix it.
It doesn't matter if it is capitalistic to illegal discriminate against certain groups.
So no, they do not have that right, if the result is an illegal pay disparity. The company would be required to correct the pay disparity, even if the reason why the pay disparity exists is solely because 1 group didn't ask for more money.
If they do that then they can enjoy their millions of dollars in fines for doing something clearly illegal.