But as already has been mentioned, nobody sees it like that in other walks of life, schools etc.
What you and many others are describing is the culture in some parts of the aikido world. Not the whole. I know someone who went to train in Japan for a couple of months, and took shodan there. In their home dojo, hardly anyone is ever failed at a test. In these Japanese dojos - a system of dojos with many teachers collected under one shihan - typically 1/3 of all students testing for shodan are failed. They was a bit shocked to find out.
IMHO it is logical to make sure the actual testing is done before the "test" when the dojo is small, so the teacher can oversee each student throughout the training process. When the person testing don't regularly train with the examinator, it makes more sense to let the test be the actual test. It also a test of the other teachers in the organisation. In failing students testing for shodan and in each case explaining why, the shihan informs the teachers what they should focus on more.
Failing 5% of students or less sounds like the harsh way for the students. If regularly 1/3 of students are failed, it is of course a disappointment but not that a big deal.
I definitely see your point, and I understand that there are many different ways to approach this, both inside and outside of Japan. I just want to add a few points though.
Firstly, while things are seen differently in schools etc. the system of testing is quite different. In martial arts, the idea is that you attempt the test when you are ready. In school, you are expected to attempt tests at regular intervals. I think it is reasonable to fail a test if you attempt it when you are not ready, but I can't think why you would fail it if you attempt it when you are ready.
Also, particularly when the person testing does not train with the tester, the results reflect on the person who is actually in charge of teaching. If a teacher consistently recommends students who are not ready, then it reflects very badly on them.
Obviously if you are in an environment where people regularly fail, then it is another matter.