Because they don't have all the needed information for the taxes to be filed. They only have the information that gets reported and not all forms of income get automatically reported to the IRS. In the case you mentioned it was likely because some of the income such as from their employer was reported.
Another reason is the tax preparation industry makes a lot of money and they lobby to prevent making it easier for people to file taxes and not need to pay for it.
Tax Preparation Services in the US - Market Size 2004–2029
What is the market size of the Tax Preparation Services industry in
the US in 2023?
The market size, measured by revenue, of the Tax
Preparation Services industry is $14.4bn in 2023.
Here is an article that goes into more details about why we can't have free tax filings which should also shed light on why the IRS can't do it for us.
Why can’t the IRS just send Americans a refund – or a bill?
Almost 20 years ago, Congress directed the IRS to provide low-income
taxpayers with free tax preparation. The agency responded in 2002 with
“Free File,” a public-private partnership between the government and
the tax preparation industry. As part of the deal, the IRS agreed to
not compete with the private sector in the free tax preparation
In 2007, the House of Representatives rejected legislation to provide
free, government tax preparation. And in 2019, Congress tried to
legally bar the IRS from ever providing free online tax preparation
Only a public outcry turned the tide.
The public part of Free File consists of the IRS herding taxpayers to
commercial tax preparation websites. The private part consists of
those commercial entities diverting taxpayers toward costly
According to the Treasury Inspector General for Tax Administration,
which oversees IRS activities, private partners use computer code to
hide the free websites and take unsuspecting taxpayers to paid sites.
Should a taxpayer discover a free preparation alternative, the private
preparers impose various restrictions such as income or the use of
various forms as an excuse to kick taxpayers back to paid preparation.
Consequently, of the more than 100 million taxpayers eligible for free
help, 35% end up paying for tax preparation and 60% never even visit
the free websites. Instead of 70% of Americans receiving free tax
preparation, commercial companies whittle that percentage down to 3%.