If you loan money to people or projects, those recipients need to have the means to pay it back. Governments do not produce anything, so they must get their money from those who are productive. To "stimulate" the economy, they are taking it from productive projects (Exports), skimming expenses off the top and then sending it back as "stimulus" funds.
That's an ultra-libertarian view of government, and it's not entirely accurate. Don't get me wrong....capitalism is great at steering money and resources towards where it's useful. However, capitalism also has some very significant shortcomings too. For example, many corporations today are not investing for long-term sustainability, but rather short-term profits. The almighty buck is all that's important. The environment, product safety, employees, etc... are all hindrances to the bottom line. And unbridled capitalism naturally leads to monopolies, where all the original benefits of capitalism cease to exist. And without regulation, you end up with extreme pollution, slave-like wages and working conditions, extreme polarization between the "haves" and "have-nots", etc...
You need government taxation and spending to pay for stuff that requires long-term investment, like roads, and scientific research that may not pay off for many years. You also need government to create a somewhat "fair" system (i.e. graduated taxation rates) to create a stable society that isn't going to revolt and overthrow the government every 10 years. And you need government to regulate industry to prevent monopolies from forming, and from allowing things like the financial crisis from occurring (which lets be honest was a product of decades of deregulation of the financial sector).
Capitalism is a lot like a Ferrari, and government is the 'brakes". Sure the brakes slow down the car. But you still need brakes. Without it, you end up with spectacular crashes (e.g. the financial system crisis).