It may technically be legal to ask about postsecondary graduation, but asking for a high school graduation year is generally considered illegal, since that’ll pretty much get you within a few years of the applicant’s age. (I’m honestly unsure whether that’s relevant though, since the first comment said “degree,” which isn’t what we call a high school diploma where I’m from.)
Not necessarily requirements, but sometimes government contracts favor contractors that employ veterans, so it’s more like the company is hoping to be able to use you on paper.