"Most of those conflicts are a pretense to funnel trillions of dollars into the economy,"
This is called military Keynesianism. It's how you can sell Keynesian economics in conservative societies that oppose anything resembling "social" spending. Since it's somehow not wasteful or "socialist" to funnel unlimited stimulus money through the defense budget, that's where it gets funneled.
The catch is that you have to have a war somewhere to keep justifying it.