Why do banks give loans, houses and credit cards to those who can't afford it?

Maybe I am missing the obvious motive but logically, doesn't this hurt the banks? What do they get out of giving a loan/credit card to a person who is unlikely to pay it back? They did this years ago which lead to the bailout, what were the motives?
Update: Nobody has answered my question. WHY would a bank do this when it causes them to go into debt and they literally gain nothing from it?
Update 2: Again, the money they receive in the bailout doesn't benefit them because it's spent trying to pay off the debt their customers created for them.
Update 3: Stephanie that makes no sense, if a person can't pay their bills, chances are they have little of value to pay the debt anyway. Repossessed items are worth much less than what the person paid for them.
Update 4: And also, a person who claims bankrupcy gets out of the situation free
14 answers 14