All investments have some level of risk, and bonds are no exception. Some bonds, such as U.S. Treasuries, have virtually no chance of default, while others have a significant default risk.
Companies issue bonds to raise capital and meet other financial obligations. If all bond interest rates were equal, investors would only buy bonds of the least-risky companies and government agencies. So, to entice investors to buy their bonds, companies with less-than-perfect credit ratings are forced to pay higher interest rates than companies the market perceives as "safe." This is known as a default risk premium.