(20+ years in tech, ymmv, n=1, thoughts and opinions my own)
Was the testing just leetcode crap, or was it based on actually being able to get stuff done? ;)
If it's something you can share, do you remember what the salary range was roughly?
Sure, companies can and do hire globally, but at the same time managers still want most of the people to appear in the office from time to time (for whatever reason). But if IT guys demand working permanently from home, then it changes everything. Suddenly, being local doesn't cut it anymore, and the job could be done by someone halfway across the globe. Be careful what you wish for; demanding remote work is a double-edge sword which could make lots of positions way less secure.
But it's not that simple. Cultural differences, timezone differences, the inability to meet face to face all make the employment relationship less effective.