In reality, it's a bit more complicated, because states are run by people, and those individual people have interests, not the states.
The latter consideration helps to understand why eg the US invaded Iraq in the 2000s but then didn't take their oil (as your 'control of scarce resources' theory might predict).
Control of scarce resources.