Testing can be used for other things too...
1. Quality control.
Look at this class and teaching schedule:
http://www.seido.com/fileuploads/HonbuFullSchedule.pdf
With several hundred students and classes running from 7:30 am-9 pm, students are going to get overlooked if there's not a solid plan in place. Some students might not ever see the CI if their personal schedule conflicts with the school's schedule. If I was a student there taking classes under different instructors, there could be too much variation in when the difference instructors thought I was ready.
Testing students from different schools also serves as quality control. If teachers consistently bring students who don't perform as well and/or fail, that can be addressed. If students from a particular school are all performing specific standardized techniques differently from the rest of the schools, that can also be addressed easily. With a central figure testing students from affiliated schools, the CI is held accountable for his/her students. These issues continually arise and get addressed.
2. The test is part of the learning process itself.
Students learn to pass AND fail gracefully. Especially the kids. They learn they have have to put in the work, and they have to perform when it matters most. They still have to perform every day in training, otherwise they won't test; but they also have to perform well when the pressure's really on. They're not going to get a participation award in the form of a promotion. They have to earn it. If and when they fail, they're taught they need to work harder and/or smarter if they want to be successful. If the student didn't accomplish their goal, they've got to change their approach. That's a life lesson that can't be simulated the same way and to the same extent without the testing process.
There's been students over the years who've been forced out of their comfort zones and are better for it. I remember a female student in my previous organization who refused to spar with males. She was told from the beginning she'd have to during her training and especially during her black belt test where she'd spar with men she didn't know. She wasn't from my dojo and none of us knew what her issues were, but it seemed obvious to me that there was some form of abuse from male(s) in her past. She was a wreck during the required sparring, but she got through it admirably. She later on told me and a few others that it really helped her personally.