The same facts as the other answers, but with different illustrations and a rewording that may be of use. The OP wrote:
Hillary Clinton spent so much on her 2008 presidential campaign that she got into debts of over USD30m.
Let's correct the wording:
The campaign promoting Hillary Clinton spent so much on its 2008 presidential campaign that it finished with debts of over USD30m.
Think of it like the backers who invest in, and the bankers who finance, expensive Hollywood movies. Some movies fail and lose money, but other movies turn large profits. The fact that the movie business continues to exist proves that the total profits on movies consistently outweighs their losses.
A campaign's investors profit somewhat more indirectly. Suppose a widget magnate indirectly somehow donates $1M to a campaign. The widget magnate might want a lower widget tax, (or none at all), or perhaps a higher tax for his rivals, or a large order of widgets from the government, (perhaps at a huge markup), or a widget monopoly in some conquered province, or free or cheap land to build widget factories, or not to be fined or punished if a factory poisons its surroundings, etc. For the widget maker a grateful lawmaker can be like the genie in Aladdin's Lamp. Any one of those things might be worth ten or a hundred times $1M to the widget magnate.
It was the custom when men received nominations to come to me for
contributions, and I made them and considered them good paying
investments for the company. In a Republican district I was a strong
Republican; in a Democratic district I was Democratic, and in doubtful
districts I was doubtful. In politics I was an Erie Railroad man all
the time.
-- "Jay Gould : A Character Sketch" by
William T. Stead, in The Review of Reviews (February 1893)
The widget magnate has rival magnates, and they want the same things he does. To protect themselves from each other's lawmakers they compete to fund grateful lawmakers of their own; politicians are like magical soldiers for these warring magnates, not unlike a child's trading card game.
The fact that extravagant political campaigns continue to exist proves that the total profits for campaigns consistently outweighs their losses.