Not sure that is an accurate statement, but there is a pecking order established by law.
Yes, there is a pecking order established by law, and as written that wasn't 100% accurate.
Secured creditors are paid first (these would normally be the largest entities), and then unsecured creditors are paid next, and then stockholders last. However, one of those unsecured creditors could be a small contractor or something who borrowed money based on outstanding invoices that now will never be paid and they don't survive.