Yes and no. The government still has to pay interest on its debt, which is paid with tax receipts. The government shouldnt be in the business of making money, yes, but it also has to spend less than it makes. In this case, these loans would have had a negative real yield, meaning they made things worse debt wise. The consequence for higher debt, is devaluation of the dollar and these massive and frequent swings in economic conditions.
You should read the creature from Jekyll island. Bailouts just make the problem bigger and more centralized. It cant fix anything, its not possible, that debt still exists on someones balance sheet, it still accrues interest.
As you say, their profit isn't the point. Giving someone a loan with low enough interest is basically just handing them money free and clear with extra steps. So the real question is whether the handouts to the banks helped the populace or came at their expense. Would other uses of the money have helped more?