It is simple. The law states that's the way it is.
Think of it as you owned a part of the company by buying the shares. As a part owner, you are responsible for its debts, just like you are for your personal debts. Unlike personal debt, your liability is limited to your investment. That's a benefit that a person doesn't have. However, unlike a personal bankruptcy, corporations can't protect certain assets like a house. That's the trade-off. Therefore, you were forced to sell everything to pay as much of the debt as you could. Since you couldn't pay it all off, you had to give everything away. You are left with nothing.
Sorry, but the company warned for months that the stock would be worthless eventually.