If I remember correctly its primary role is as a tank killer.
That's what it was originally designed for, but it's used primarily for CAS now. It changed roles, and it's much better for its new purpose. Anybody who talks shit about the A-10 by saying it's not good against modern tanks is missing the point.
Bullets themselves may be cheap, but maintaining an entire aircraft platform isn't. It is more efficient to fire a single missile from a multipurpose aircraft to get the job done.
Um, you still have to maintain that multipurpose aircraft, too, and it costs WAAAAAAY more to keep up than the A-10. Additionally, missiles and bombs have a huge blast radius, and they will never be able to do exactly what the A-10 can do with its gun.
The A-10 is not a viable option in a modern networked and defended airspace scenario. Iraqi SAMs were shooting them down in Desert Storm 25 years ago. If the airspace is not contested or seriously defended an AC-130 can loiter longer and deliver more ordinance. The A-10 is obsolete, and keeping it around is a waste of money that should be spent equipping more squadrons with F-35s.
Except not every situation is a modern networked and defended airspace. Against lower-tech targets (which is how we spend most of our time fighting these days), the A-10 is still dirt cheap and supremely effective. The F-35 is not ready to take over CAS...when it is, then we can talk about getting rid of the A-10. And please don't even begin to compare the money between the two planes, as if cutting the A-10 is actually going to make a difference in the defense budget and get us significantly more of those oh-so-desperately needed F-35s. At the moment, we only need them if we get rid of the A-10! Yes, if we go up against Russia, the A-10 will have limited effectiveness, and we should be working on a replacement...but we don't have it yet. Don't sell the car for gas money.
To me everyone who needs support on the battlefield want to keep it and everyone who buys new military hardware or trims budgets wants it gone
That's a pretty easy choice to me, and it should be to any leader. Veteran lives should not be for sale. If we cut the A-10 now before its replacement is ready, we will be trading soldiers' lives for a few billion dollars. And we won't even end up saving money, because losing the A-10 would presumably ramp up production of the wonky and fantastically expensive F-35. The only budget those people are worried about is their own.