Because capitalism. Or more specifically because your company has very little incentive to pay you more than the market rate in your locale, unless you give them one. You can either try to do that as an individual by basically saying "I'll quit if you don't pay me more" or you can try to do it collectively with your fellow devs by organising and engaging in collective bargaining. Both paths are risky because your local employer might call your bluff (how special are you?) or even if you manage to get a collective bargaining agreement, there is no guarantee the parent company won't take a look at your division, decide that the numbers no longer add up and offshore your job somewhere even cheaper.
"What would the company gain if I work from a different location that they would pay me more?"
Having you, pyrodactyl work from a different locations? Your employer would probably gain nothing. Having a presence and hence a team in another location with a pyrodactyl-like employee doing pyrodactyl-like things. Probably quite a lot. Which is why companies don't generally off shore the entirety of their development teams even though that would be cheaper.