> We both make the company the same amount of money.

This is a common mistake. Compensation isn’t directly related to the value you produce. The value you produce for the company only sets an upper limit on long-term compensation.

Instead, your compensation reflects your opportunity cost of staying with the company. The company seeks to pay you the minimum amount required for you to continue working with them versus taking another job somewhere else.

Before you conclude that this is unfair, it’s important to understand that you do the same thing in your own decision making. If your car mechanic told you their rates were doubling to be more in line with mechanic rates in wealthier countries, would you think that’s fair? Or would you drive across town to a mechanic with more reasonable rates? Imagine if the mechanic said “I’ve seen the size of your house and your job at a big company, so I know you can afford it!”

Obviously you wouldn’t arbitrarily overpay for something due to completely unrelated market rates in a different country. Obviously the size of your bank account shouldn’t be permission for someone to overcharge you for services. Compensating employees is no different.

> I've always thought it was just another bit of bullshit capitalist policy by companies. Another way to save a dime. My roommates argue about lower cost of living etc.

Your second mistake is being upset or surprised when companies make decisions to save money. The entire purpose of a company is to generate more revenue than they spend, so of course they will make choices to efficiently allocate that capital. Again, you’re no different with your own personal decision making.

Hypothetically, let’s assume a company did institute a policy of equal pay at all offices. You would like to think that they’d choose the highest paid location an raise everyone’s pay to match that, but no sane company at scale would make that decision. Instead, they’d probably index to the average compensation, bringing everyone’s compensation toward the mean. Higher paid employees would receive a huge pay cut while low cost locales would see a huge pay raise. What do you expect to happen to the SF employees in this scenario? They will quit and take a job at a company down the street that will pay them market rate. What will happen to those employees in lower cost of living locations who were already choosing, voluntarily, to stay with the company? Nothing. They will stay in place, just like before.

Now that all of your SF employees have rightfully quit, the company will realize that their average “fair”
compensation is unnecessarily high without SF salaries, so they can safely lower it to an average compensation for other locations. Again, the people in low cost of living locations rejoice while the people in high cost of living locations quit and take jobs that pay market rate.

Repeat this process for a few iterations and you’re only left with employees in the low cost of living location.

The sooner you accept that engineering labor obeys the laws of supply and demand and that you’re not paid according to the value you produce, the easier it is to understand while people are paid differently in different areas. Before you argue that people should be paid according to the value they produce, ask yourself if you’d be willing to pay money to the company if you accidentally produced negative value by introducing a major bug or if your team’s product launch failed. Of course you wouldn’t expect to be financially coupled to the risk and financial downside, which is why it’s unreasonable to expect to be directly coupled to the financial upside.