If one cannot get the loan one wants at the rate one wants, there still exists usually a rate at which one can get funds: this is what the junk bond and credit card debt markets offer. In Tesla's case, they could not get a loan of the size they wanted at the lowest market rates. They probably could not even get that much at junk bond rates: the loans were highly speculative, as Fisker's failure shows. The Energy Department loans were a subsidy: the government got too little interest for the level of risk they assumed in making the loan.
This is just basic economics.
This isn't about economics, it's about public policy. There wasn't a junk bond market for Tesla (or any of these other alternative energy companies) at any price. There's a reason that start-ups rely on venture capital firms and not Wall Street for seed capital -- for the amount of money these companies needed to get going the private markets were inadequate because the money simply wasn't there. The payoff timeline is too long for junk bond folks, but venture capitalists usually have the proper time horizon to let these companies grow.
From a public policy perspective, the US government had good reasons to create this fund and make these loans -- not only would new companies (or old companies with new products, like Nissan or Ford) create jobs and new industries in growth areas in the US, but these companies were going to be creating and scaling new alternative technologies. This used to be the purview of the government during the space race and Cold War, but everyone thought it would be better and more efficient to have private industry do it (remember, the ATSV program was bi-partisan and enthusiastically endorsed by Bush and Congresional Republicans).
So, in the case of Tesla, instead of the US government trying to improve battery technology, they gave Tesla a loan, which we all make a profit on, and they've helped create thousands of jobs and jump start a whole new sector of the car market. If you were a politician, wouldn't this be viewed as an unqualified success? On the other hand, what do we (as taxpayers) get for the subsidization if the oil industry?
Remember that new and emerging industries don't, by definition, have entrenched interests and lobbyists on their side like established industries and companies do. The loan program helps to level the playing field just a bit, and that's a good thing.