This is a complicated issue. On one hand, it seems callous to move children to a higher level of learning when they clearly do not understand the fundamentals. On the other, do you want a fifth grade girl in the same class (and at the same recess) with a boy who is several years more physically developed and well into puberty? What about students who are successful, and maybe even advanced, in some areas, but woefully behind in others?
The research is largely split. In general, neither retention or social promotion seem to have a statistically significant effect on students' overall learning. For every case of a student success story on the side of retention, there is a case that shows the irrevocable harm done to another student in a similar situation.
Frankly, the current education system is neither built for nor funded enough to handle these sorts of situations adequately. In an ideal situation, students would be given scaffolded supports individually tailored to their needs to help with any educational deficiencies that they might face while still progressing normally in areas where they succeed. Students who excel would be allowed to prove their mastery of standards and moved on to higher levels, again progressing normally in areas where they are not as strong or even deficient. Various attempts have been made to meet that ideal situation, but even those that have been successful require certain social and economic conditions to be met.
There is no easy fix, but at least acknowledging the problem is a step in the right direction.