The people who issued the debt (made loans to the company to buy back its outstanding shares) are sophisticated investors who saw the balance sheets of the company and thought they were likely to get paid back. If things had worked out, they'd have made an above-market interest rate. They also knew what would happen if things didn't work out (the present situation is a typical downside for LBO capital). They didn't lose all their money -- they made 7.375% interest for 15 years. If they get 50% of the capital back through bankruptcy, that's a total return of 160%. Not the worst investment over the last 15 years, though obviously Apple would have been better.
The junior debt, of course, has nothing pledged to back it at all. Junior debt in leveraged buyouts is pure gambling.