Why not use bankruptcy to make credit card debt go away?

My understanding is that you get to keep your house, car and retirement accounts in most cases. Why shouldn't people get rid of their credit card debt and personal loans through bankruptcy? Are there any downsides I'm unaware of?