I think the answer is simply practical. Since we have no competition in most styles of Aikido, there is seldom the opportunity to get out there, under pressure, in front of your peers, and have to walk your talk. Most keiko is done in a "learning" mindset but testing is a time for "doing".
Most people like to have feedback about what they are doing. The person described by Goldsbury Sensei who can simply train for years with a Sensei without worrying about tryingto mark or evluate their progress is rare. For some people their stated belief "I am not INTO testing" is really an avoidance reaction against something which they were scared of doing. Simply training is a lot easier than periodically having to put it all on the line.
I think that the hierarchical nature of ranking makes it easier to run a dojo smoothly. Even in a dojo which does not make a big deal about rank, the emebers are generally aware of who is senior and who is junior. This gives the interaction between the memebrs a bit of structure that can serve to ease some of the tension that can come with people of different preferences and abilities train together.
On a very small but important note, I think that testing for various ranks forces the typical student to accept responsibility for knowing the technical details of what he or she is studying. Many, if not most, students do not really get the names of the techniques in to their long term memory until they are forced by an immenent test to do so. The same is true for weapons forms, the differences between omote and ura variations on techniques, etc.
Finally, we are a very mobile culture. Many of my students have moved away and now train in other dojos around the country. I have students who have moved to the Seattle area and now train at my dojo. It is hard enough to come into a new school with its own set of seniors and juniors etc. without doing so without any reference point, any acknowledgement of what work one has done before.
I recognize the rank of any student who comes to our dojo from elsewhere. The understanding is that when they next test they have to know everything that someone from our own organiztion would be expected to know. Then at least the new student gets recognition for the work that was done before they arrived at our school. After that they have to be able to hold their own in practice.
The classical systems didn't use Dan ranks, they simply had various levels of teaching certificates. But they did have systems of kata which provided people with a sense of where they stood in their training. You didn't get do, in some cases even see, the next set of forms until you had acheved some competence in the previous set. So everyone training had a pretty good idea of where everyone else stood technically. I think kyu ranks and Dan ranks fill the same function.