First, a company needs a steady cash flow before it can consider issuing debt (otherwise, it can quickly fall behind interest payments and eventually see its assets seized). Once a company can issue debt, it will do so for a couple of main reasons.
If the expected return on equity is higher than the expected return on debt, a company will issue debt. For example, say a company believes that projects completed with the $1 million raised through either an equity or debt offering will increase its market value from $4 million to $10 million. It also knows that the same amount could be raised by issuing a $1 million bond that requires $300,000 in interest payments over its life.
If the company issues equity, it will have to sell 20 percent of the company ($1 million / $4 million). This would then grow to 20 percent of $10 million, or $2 million. Thus, issuing the equity will cost the company $1 million ($2 million — $1 million).
The debt, on the other hand, will only cost $300,000. The company will therefore choose to issue debt in this case, as the debt is cheaper than the equity.