In debt finance, lenders get paid first before shareholders because they take on the risk that the business might not succeed and be able to pay them back (loss-given default). However, if the business does succeed, shareholders don't make any money until after lenders recoup their money.