In order to support government spending – be it for fixing federal deficits, economic boosting, you name it – the government offers bonds as debt securities.
Similar to government-issued bonds, corporate bonds are similar in that investors agree to purchase bonds from corporations in order to see an agreed upon periodic interest return.