The A-10 is designed for a specific useful purpose of fighting this sort of war.
Actually it is a cold war leftover, it was designed to destroy USSR tanks in mass attack, it just happens to also be very good for ground attack generally.
The F-35 is designed for the purpose of transferring huge amounts of money from the taxpayers to the Military Industrial Complex.
Yes, there is some truth in that.
The A-10 has a lot of friends , but it is not about to make any fortunes or pay the freight for a large factory with a lot of employees.