Indian Airforce conducts a test called PABT (Pilot Aptitude Battery Test), for anyone who wishes to be a pilot. This test can be taken only once, and once you fail it, you can never appear again (which inherently disqualifies you from being a pilot in the Indian Armed Forces). Why is such a test so important, and how does failing in it reflect on your piloting skills?
A few thoughts:
They have no need in getting repeat candidates if the selection pool is sufficient (which I imagine it is). Starting to accept repeat candidates would also make it harder for first timers, resulting in more work and tests for everybody. People also won't go for the fun of it, but will make their single attempt their best attempt.
I believe they would rather want you to nail it on the first attempt as part of the test. In other words: how do you respond to a new situation, how to you respond to the stress of knowing you have one attempt, etc... It would be effective for their purpose on multiple levels. This is more effective than you returning a second time and learning how to do the test.
While I can't comment on other air forces around the world, I know that German Lufthansa implements the same policy for acceptance.
The goal of this kind of testing is mainly to identify those candidates who are most likely to succeed in pilot training and who can do so with minimal delays. Armed services (and airlines who offer cadet training) around the world sink tremendous amount of resources into training their pilots and are taking a significant financial and opportunity cost risk on each candidate, so proper selection critical.
Designing tests meant to capture aptitude is no small task, and validation of the measurement instrument is an integral part of it, so it's probably safe to say that there is (or was at the time of design) at least some fairly significant support for correlation between performance on the battery and future performance as a pilot.
For what it's worth, keep in mind that there are almost always more candidates than actual pilot slots. Failing to be selected for a slot doesn't necessarily mean that you aren't a good pilot or that you couldn't do the job, but rather that, at that particular moment in time, in the evaluator's opinion, there were other candidates who were better than you. To illustrate using a metaphor, all drivers competing in Formula 1 are excellent race car drivers, but only one of them can win the race.