That is relative to their budget priorities. If they decided to not be a welfare state, they could easily afford it. It all depends what your budget priorities are. So, to say they can't 'afford it' is not at all true.
So worlds in the future won't be making different budget priorities too?
Sure they will. Priorities depend on the needs percived, so they depend on the situation and view.
United Kingdom had the greatest fleet on the world, when it viewd it as necessary (sea empire, no allied fleets, piracy on the world, fleet rich contries percived as potential enemies, etc). Sure it was a great budget constainment to mantain it, but it thought it needed it, so it had.
When UK stepped down as superpower (no offense), it could rely on US (and french, to an extent) fleets as a help, so it reduced its fleet. Threats were no so important (piracy more or less under control, reduced sea empire, allied fleets, no great fleets percived as enemies, etc).
So, whith more or less the same budget, a planet on Corridor (near vargr raiders) whould surely have a stronger planetary fleet than one on Massilia or Core (where there are no borders to deffend and only the boldest pirates dare to prey).
Also, a balkanized world is likely to have more spaceships and starships than a similar world with a unified government, even if those fleets are less likely to cooperate (but don't count on that against an alien threat).
Some countries don't have standing armed forces now on earth (Panamà, Andorra, St Marino...). In the case of St Marino, probably cannot afford it (and they don't think they need it anyway). In the case of Andorra, probably they think what they could have whould be useless against their neighbours (asside that not perceiving them as threats). Panama disolved it for political reasons (and probably they're quite sure US won't let them to be threatened, given the importance of the cannal).
As you see, military spending (and fleet is part of it, thought I don't think I must reason here why Andorra or St Marino doesn't have navy

) is not only determied by budget, but also for many political reasons and percived threats.