I would argue that their hands were somewhat tied because raising the federal gas tax during a recession would have been an extremely unpopular thing to do regardless of the reasoning. Maybe we should expect our representatives to make the right choices anyway but we would probably still punish them for it.
The IRA has a similar problem, its all climate change 'carrots' because all the various forms of carbon taxes necessary to go the 'stick' route would be deeply unpopular despite probably being more economically efficient. I'm sure in a decade we will be talking about all the bone-headed perverse incentives that came out of it, but I'd rather that than us talk about how we missed the chance to pass the biggest climate bill in US history.
All that said, they definitely still could have crafted better legislation that had fewer side effects than the footprint system they went with.