I think (and know very little, so could be wrong), that the purpose of war is to expand influence. This can take the form of access to new resources (whether that be land, access, air space, whatever) or to form a buffer between one country and another. There's probably other reasons, simply like ego in some cases.
There are other ways to expand powerbases too - such as China's heavy financial and infrastructure investment in Africa and South Pacific nations, or attempting to undermine another country's social structures. These are longer and harder to implement, but yield better results with practically no blood shed.