Unfortunately in today's economy, creditors are looking to collect on their losses by placing liens and judgments against the property. It's not uncommon for the IRS, hospitals, doctors and credit card companies to attached these debts to a home mortgage. If the house forecloses and the value of the home isn't sufficient to cover these debts, with the exception of the IRS and state municipalities, the other creditors will not be paid from the sale. Also note, those debts will still be owed.
Oh yes. Many people have a second mortgage or HELOC and may have a mechanic's lean or judgment for other work done, or possibly condo association. And if taxes or public utility bills are not paid, those will be leans against the property as well. Doesn't mean they will all get paid, but they do have claims. This is why if you are buying any house, you need your attorney to ensure you have clear title and why you will purchase Title Insurance to guarantee to the new mortgage lenders that you own the property should they have to foreclose.