The analogy of the cave is used by Plato to point the way to towards a new discipline - the discipline of metaphysics.
By pointing out that a higher level of understanding is attainable, and by drawing a distinction with a life lived in ignorance of this higher level, Plato is making a case for allowing philosophers to pursue their interest in metaphysics, for the good of everyone.
The prisoners in the cave have a limited understanding of their world, this is not because they are not intelligent or perceptive enough to achieve that understanding, but because they are (literally) chained. The analogy with philosophy is that philosophers are chained by their failure to ask the right questions and look in the right direction. If they were to think about the right things (e.g. Forms) they would be freed from their metaphorical chains and thereby have access to a whole new level of understanding about the world.