Every war I’ve been able to find there was a clear resource issue that a ego, belief, nation identity, whatever reason was then pasted on top of to justify.
Even the crusades had a clear economic justification - massive overpopulation of fighting age males resulting in a shortage of jobs, opportunities, and money. Sending them off to die (and loot and pillage) solved both problems. Beliefs were used to paper over the obviously unpalatable reality on the ground and help recruit.
Besides whatever is captured, there are of course other things successful war gets you - fewer young men rattling around locally causing problems (including crime, revolts, general instability), your new ‘green’ military leaders get to cut their teeth in the field, ‘better’ female to male ratios for your traditionally male leaders, more space (aka conquered territory), looted riches and newly available natural resources, and it often reduces competition and neighboring populations that would get in your way within a region in general.
This doesn’t last that long obviously, as a generation or two later the population has again increased, your veteran leaders have retired, etc.
It’s not always so direct of course - most of the recent American wars are more about burning old excess material inventory, keeping domestic military manufacturing expertise alive, and ensuring domestic weapons manufacturers of all types are able to stay on the cutting edge, but it is still the same song and dance when you get down to it.
While you average solder may fight for a cause, a nation only goes to war when the books show it needs to happen.