Because they did the same work?
>who is anyone to say that's not allowed?
I didn't say it's not allowed. I think it's poor business practice, and poor for society, incentivizing devs to stay in expensive areas instead of moving out to cheaper remote areas.
>If you forced them to be paid the same then one of them will not be working for you even if they want to; either because you can't afford to hire them both or the bay area engineer can't live on the salary.
That is speculation and I speculate you are wrong.