Someone who's more knowledgeable than me will be able to tell you in more details but, based on what I was taught of journalism law/legal stuff, etc. at uni, celebs often declare bankruptcy to avoid paying certain debts. It doesn't cover everything but you can be considered no longer liable for certain owed payments if you can "prove" you've not got the means. Accountants and consultants will have advised Mendy to do this, most likely.
Kerry Katona's a good example, actually - she's declared herself bankrupt about three times in 15 years and she's admitted it's often been on the advice of accountants. Same with Katie Price. They spend all their cash, panic, then get an accountant in to say all their fortunes are tied up in assets that can't be given up. Mendy's not been able to get away with it by the looks of things, with him having to sell a house to pay off the debt.
In genuine cases it's because a lot of newly rich people get loads of cash at once, get used to the lavish lifestyle, and start buying things on credit cards with huge limits with a view to paying them off later. But then something like the rape case happens to Mendy, his means of income dry up, and the people he owes debts to aren't gonna give a shit whether he was acquitted or not. He's still suing City for about £10m, isn't he?
More on it here.