It would be lovely if we could all just get on, and if we had all, as nations, developed at the same rate, without attempting to exploit as many other nations as possible, and if there weren’t so many varied and colourful ideologies and religions.
Were that the case, and if some nations weren’t still trying to do all the above unpleasant things, then yes, there would be no need for huge defence budgets.
But sadly, that’s not the case. In the meantime, whilst we wait for everyone to just play nicely, every penny spent on extending the knowledge of the race is a very good thing.