One possible understanding of the “fighting them over there” concept is that while fighting them over there doesn’t prevent them from attacking us over here, declining to fight them over there might invite attack by demonstrating weakness. This is part-and-parcel of the right’s tendency to view national security policy as something that takes place entirely at the level of symbolism. In the real world, it makes very little sense.
Ask yourself why signaling weakness might invite attack. Or, better, ask yourself why signaling anything might matter under any circumstances. The answer, of course, is that signaling matters because it signals underlying reality. At the end of the day, though, what matters isn’t what you’re signaling, but rather the other guy’s perception of your objective strength. In the case of Iraq, continuing the occupation is obviously making it less possible for us to deploy military assets (or, indeed, diplomatic or financial assets) anywhere else for any purpose. Unless you assume that whichever enemies were concerned with are really, really, really dumb they’re going to be more impressed by our lack of actual capabilities than they are by our steely determination.
Most generally, there’s no point in worrying too much about signaling. You can’t prevent messages from being misinterpreted. Terrorists and bloodthirsty dictators, in particular, are prone to seeing the world in eccentric ways. The most reasonable course of action always to make the objective situation as favorable as possible. That way, even if your “the objective situation is favorable” signal is misconstrued, the actual situation will, in fact, be as favorable as possible.