I think that it is in fact a very good idea to allow students to test out of classes. If they are smart enough to know the material already, then there really is not too much that can be hoped to be gained by making them stay in the class.
I don't see any reason for a teacher or a students time be wasted if they know the subject. It is no different than taking an entrance exam for college to see if you can forgo remedial courses. You can also CLEP out of some classes if you score high enough on the exam. Why spend time on a subject you already understand, when you can be studying something else. When you are forced to be in a class you already know, the student gets bored and can fail.
If the student knows the material and can prove they have the required knowledge it is just a waste of time to force them to take the course regardless. Let them test out of the course and move on to a new one they don't know so they can spend time getting new knowledge, not learning something they already know.
Some kids do get more education at home than other kids, and some take it upon themselves to learn different material. These kids should have the option of testing out of a course, say something like Freshman English. If they know that material, their time would be better spent in courses that will challenge them, not hold them back.