If a company goes bankrupt, lenders are the first to receive their money. Shareholders receive money last, if at all. Since bonds are a type of loan, you're more likely to be paid back if a company goes under.