Sadly, that’s how a lot of public jobs work. That’s how it works at my job. The only thing that matters is seniority. In some cases, it supersedes qualification needed for the job. It makes no sense.