The Department of War was its original name. I’ve always thought it to be a more honest name than the Department of Defence.
Afghanistan is arguable, but it was primarily to prevent terrorism.

primarily

Ostensibly.

Well they didn’t go over Afghanistan for the oil.
Opium production in Afghanistan - Wikipedia

Attacks on heroin production were primarily to hit the Taliban’s source of funding. Fentanyl is synthetic, and almost none of the US heroin comes form Afghanistan.

www.bbc.com/news/world-us-canada-47861444

The Afghanistan was really was about terrorism (even though the hijackers were Saudis).

How the US military's opium war in Afghanistan was lost

The US has spent $1.5m a day fighting the opium war in Afghanistan. Why is business still booming?