Commercial or financial interests can often be part of the impetus to go to war, whether it be to protect financial interests abroad or to gain land or other resources. Japan invaded territories in World War II in order to provide their industrial complex with the raw materials like coal, iron ore, etc., that they could not provide from the home islands. Some might argue that the very first wars were almost always driven by financial interest in greater territory, room for agriculture, etc.
In terms of why the U.S. is in Iraq and Afghanistan it gets much more complicated even though some argue that the purpose of the Iraq war was to get cheap oil. There are political concerns about terrorist safe havens in Afghanistan and Pakistan, there were feelings of unfinished business and some desire to take down Saddam, but certainly financial interests could have played a role in the decisions as well.