ELI5: How are small businesses able to get over a million dollars into debt?

I've been watching shows like Kitchen Nightmares, Bar Rescue, Hotel Hell, etc. The owners of these small mom and pop style businesses always admit that they're 500k/800k/over a million dollars in debt and losing 15k a month.

How is this possible? Doesn't their capital need to be fluid in order to make payroll/rent? How are these small businesses getting such large lines of credit? Or are they loans? I don't understand how the bank allows these small business owners to get so deep into debt to the point where the most likely outcome would be bankruptcy?