I’m giving you an example. A US citizen overseas must file tax reports with the IRS. A Mexican who was in the US illegally has no requirement to file with the US IRS.
Why the difference? Answer: because the US citizen is ‘subject to the jurisdiction’ of the US government.
The illegal Mexican is not.
If congress has made such a law, fine (although I'm not sure that's the case). My point is that our laws are enforced on citizens and non-citizens alike. There may be differences in the laws, but both categories are fully subject to the relevant law.