Who else paid the bill? Typo is in the name not SS#. If someone made a mistake in SS# then IRS would likely accept only the first return. If there is total mismatch with the IRS record I don't think IRS would accept such tax return. I even doubt full mismatch is possible with someone on W-2 payroll.
I think this is easier to explain from the beginning. Let's say I'm an employer and I pay you, a W-2 employee. I pay my employer part of your SS and withhold your employee part and remit both to the IRS. When you file your taxes, the IRS matches your return SSN to the withholding SSN to ensure that the appropriate amount of SS was withheld and paid by the employer. If there was any kind of "typo", then they will show that you didn't pay any SS tax. They'll send you a bill for at least the withholding part, and if it looks like you're self-employed than for the employer part as well. If this was a mistake because of a typo, then you'll alert them that indeed you did have your SS tax withheld and eventually they'll be matched and that money the employer remitted will be connected to your tax return. If you're using a fake SSN or a dead person's SSN and your employer assumes it's good they're still going to withhold your SS tax and pay the employer part and remit both to the IRS. That money will then sit at the IRS waiting for someone to file a return with a matching SSN. If this never happens, then someone was obviously using a fake/invalid SSN with their employer. The vast majority of the time this is someone working without an appropriate work permit. The money goes into the SS fund just like every other contribution, and the undocumented worker just helped out the SS trust fund without getting anything out of it. It's trivial for the IRS to count the money in this status and report it, which they've done here. It's not there because of typos!
As I indicated in my post fake SS# is very unlikely b/c IRS would not accept that. And the IRS should be the first one to pay such a business a visit. As for SS of a dead person it's possible but also unlikely b/c it's hard to obtain such information on the large scale other than by some sort of criminal activity. And we don't want to overlook that either for any amount of taxes paid.
I think I just must be doing a poor job of explaining. The IRS will accept SS withholdings and matching contributions from anyone with any SSN/TIN. It's trivial to get a TIN, by the way, you fill out a single page form and send it in to the IRS. That's the pool of money referred to in the article, SS remittances that were never claimed on a tax return.
Yes, valid TIN or SS do not mean there is a mismatch with the IRS records as indicated by the OP. As for a fake SS I don't believe the IRS would accept that. As I indicated in my previous post IRS should be the first one to pay such a business a visit. Followed by many others.
Last year my 1040 was rejected from e-filing because a "tax return had already been accepted with that (my) SSN". I had to print and resubmit by mail. (Don't know what IRS did about the discrepancy, they never contacted me.) This year the authentication process looks to have 9 entries. Assuming all must match to get a return accepted, they should have eliminated that particular fraud.
There is a firewall between the IRS and DHS and has been forever. The IRS doesn't have anything to do with determining if someone is legally in the country or not. If that's good policy is open to debate, but it is the policy now and that's why there's a big chunk of money in the SS trust fund that we can presume came from undocumented workers. That's the answer to your original question.
Ok, so how does IRS know anything about taxes being paid by immigrants(!) as indicated by the OP? But regardless of DHS I don't believe IRS would accept fake SS# not on their record. This just does not make any sense. This must be read flag for them. I think you are lost in your explanation attempt.
They might have found the other return suspiciously inconsistent and contacted the other guy. Just a suggestion.
Maybe it was fraud, maybe just a type-o on the SSN. However, there were stories on the news about fraudulent tax filing to claim refunds and it was suggested people "file early so that theirs is the first one to hit the IRS".