The thing about corruption is that it’s very inefficient. Spending a trillion dollars on weapons translates to only a couple of billions in the pockets of profiteers, the rest is used to actually make the weapons, move them in place, and to pay the people using them.
So with a useless war, you waste far more than you would if you just have the money to the profiteers.