This is completely, totally, normal.
(Just by way of example, as of writing we've placed three (3) software engineers, specifically working for US companies, who live in Europe. ("C" - Italy, major US corp. "S" - Poland, large US social startup. "M" - eastern europe, US startup.))
It confuses me a lot that some US companies say that I have to have permission to work in the USA and some don't.
If it's for a position working in the USA:
For every single programmer job ad, companies get many, many resumes sent in from folks who live in India, Europe etc, where those people are hoping to get a work visa supplied by the company.
Since there is always a "flood" of such requests, often in (on site) job ads you will see something like "We will not provide a visa" or "Please don't bother applying if you need a visa" or "You must be able to work in the US" all of which mean ... "Don't apply if you're in India or Europe!"
If it's for a remote position:
Many companies simply only want USA workers, even if remote. In this case they'll state "USA only".
Right now on the jobs site I see 20? 30? US companies, with a remote position, where it's fine if you're living overseas, and a few for a remote position where you have to be in the USA.
I have never seen a case of a remote job ad where they say you must have papers to "work in the USA". That makes little sense.
Caveat: since the US is mainly a military power, you do see a cohort of job ads which involve security and or military/government contracting: those usually require US passports, various security clearances, etc. This would seem to obviously be outside the scope of this question.
You ask, "But Fattie, why will some companies who use remote developers, only hire USA developers?"
There are two reasons:
"Language time-zone convenience" The fact is many clients prefer, quiet naturally, teams that work in aligned-time rather than asychronously, and indeed who are native Korean, Hindi, Marathi, Spanish or English speakers like programmers who live in the US. Note for example that one of the largest freelance agencies has exactly this policy - they tell their clients "we're the freelance agency that only has on-shore talent!"
Exactly as ReadyPlayerOne explains, due to "paperwork issues". (For some US companies there can be more paperwork in hiring freelancers in certain US states or certain overseas countries.)
You now ask, "But Fattie, like in high school, can you follow up with an example of what you mean?" Why, yes!
HERE'S AN EXAMPLE OF THAT:
Look down the bottom:
"Must NOT reside in California, New Jersey, Hawaii, Alaska or Massachusetts"
So yes there are some cases where - for paperwork reasons - companies won't hire remotes who live outside the USA, or indeed, in certain US states.
(But I'd say the more usual reason companies won't hire remotes who live outside the USA is very simply "time zone / language".)
So OP ...
I am not sure if the first kind of job ads have that in since it is a standard phrase of the company and they forgot to leave it out for remote jobs or if the second kind doesn't have it in since it is assumed to be common knowledge.
So, I have never seen a case of a remote job ad where they say you must have papers to "work in the USA". That makes little sense.