That isn't literally true. The 1945 Labour government spent vast sums of money (and more importantly, foreign exchange) in a vain attempt to pretend that we were still a first-rate power. This is why conscription continued until 1960, even though the young men deployed would have been better used in industry, which was desperately short of labour. (One reason for high levels of immigration, by the way.)
We even stepped up our expenditure because the Yanks wanted us in Korea, and then pressured us to rearm. For years, we maintained expensive garrisons in sundry dusty outposts and colonies, to no obvious advantage for the people of the UK.
It was much later that we started on cutbacks, first because it dawned on us that the Empire was gone, later because of the fall of the USSR.
Modern defence equipment is outrageously expensive, and we spend a disproportionate amount on nuclear bombs - the equivalent of a bee's sting, only to be used once and fatal to the bee if used. National defence relies on partnership with allies. Fortunately, the European ones are reliable.