The Loan has already been paid off by Tesla and as a nation we are better because of the money loaned to Tesla.
Of course it was worse terms than any VC would have ever taken. How was the VC market in 2008? Basically VC had been drying up and credit markets had frozen and the US government stepped in with multiple loan programs to help unfreeze the credit market. The point of the ATVM program was to provide capital to the US auto industry to fund projects to help meet higher mileage requirements and lessen US dependence on foreign oil. The program wasn't to make a profit for the US taxpayers. The program was approved by Congress with a assumed 30% risk profile. The US government provides loan guarantees all the time, Export-Import Bank, SBA, USDOE has multiple loan programs besides the ATVM, VA Loans and the USDA-Farm Service Agency.
Once the program was offered by the US government it was Musk's fiduciary duty as the CEO to apply for low cost loans when the government offered them.
Now think about something, Musk risked considerably when he invested in Tesla, SpaceX, and SolarCity. He basically risked his entire fortune he had gained from Paypal, he was all in on these companies. For him the risk was considerable, he was basically broke in 2008 and was borrowing money for rent and both SpaceX and Tesla came very close to going under.