To your question: "How do you even get to do that?" You ask. My current enterprise job was not offered as remote. It was advertised as an in-office job. When the job was offered to me, I asked if I could work remote. Due to how hard hiring is for my role, I was told it'd be no problem (and I had other offers; lesson for another thread, "always negotiate from a position of power").
The below resources come to mind as places to start (no affiliation).
I’ve worked at many US companies where we had remote workers in other countries. In fact I’d say it was more common than not. Typically they were employees of the local country or region office though from a legal perspective so I doubt they were able to pull a “domestic” salary.
How do you even get to do that ? Most of the time companies that advertise 'remote' mean 'we need a remote worker who resides in the US'