THE NATIONAL COMMANDER of the American Legion, John M. Carey, described the Supreme Court's decision Tuesday upholding the constitutionality of veterans preference laws as a "restatement of allegiance to the veteran population by a grateful nation." It was hardly that. Taking note of the long history of objections to the law it was upholding, the Supreme Court said the 14th Amendment "cannot be made a refuge from ill-advised . . . laws." While this law, it added, "may reflect unwise policy," it does not discriminate on the basis of sex. That and only that had been the complaint against it.

The decision is not surprising. On their face, veterans preference laws do not discriminate against women but against all nonveterans. The impact on women is strong because old federal policies produced so few female veterans to take advantage of the preference. But there is much more wrong with the preference that that. And there can be no clearer example of it than that provided by the current case.

Massachusetts gives all veterans, and the surviving spouses and parents of veterans killed in action, an absolute and permanent preference in hiring that they may use as often as they like. Any veteran who passes a competitive exam for a state job is ranked higher than any nonveteran, regardless of the test results or other factors. In this case, that preference meant a woman who scored near the top of the list on several exams could never make the hiring registers; too many of her competitors were veterans who went ahead of her automatically by simply passing the test.

Such a preference for veterans may be good public policy when it helps them readjust to civilian life or compensates them for time lost while their competitors were getting a jump on them in the job market.But it is poor public policy when that period of readjustment and compensation is extended forever. A veteran who exercised such a preference to get a job in 1946 or 1954 has no legitimate claim to exercise it again in 1979. But in the case before the court, two-thirds of the veterans who took procedence over the woman had been discharged before 1960.

While that may do something good for veterans, it does nothing but harm to the quality of the civil service and to the idea that government should treat all citizens fairly. The court's decision is not a restatement of allegiance to or faith in veterans preference. It is simply a reminder that the Constitution does not keep either Congress or the states from passing bad laws from time to time.