Not all veterans were citizens. Some were, at least theoretically washed out, or court marshaled. They would be veterans, but not citizens.
Starship Troopers’ world also restricted certain jobs to citizens (such as teachers of moral history) and the Sky Marshal had to be both a veteran of the Mobile Infantry and what ever it was they called the space navy.
Heinlein didn’t have much of an argument for that system. He said that first, it worked. (at least in that fictional government). After that there was a ‘fitting’ argument.
I was issued my M-14 when I was 17.
Right now, in the US, foreigners who serve a term in the military are put at the head of the line for citizenship.