This question geared towards STEM but can definitely be expanded for courses in the arts as well.
Imagine the following scenarios:
A student has taken a course, but passed the course with barely a 60 over the 50 percent required to pass the course.
A student has taken and passed a course with a project component, but found that it would be beneficial to explore other topics if given another opportunity, in particular, using the expertise of the instructor and the resources provided in the course.
A student has taken and passed a course, but due to family issues/illness/personal issues/financial issues/job/internship, etc. the student takes a break of one or two years; when the student returns to school, he or she would like to take the course again as a refresher.
A student has taken and passed a course, however due to change of instructor, textbook, and other circumstances the course material was presented in radically different way, the student feels that the material presented has been inadequate or non-standard and would like to take the course again.
In each of these cases, from a student's perspective, I do not see why it makes pedagogical sense to prevent the student from taking the course again. The student could improve over his or her previous poor performance, explore alternative topics in a guided way, refresh his or her knowledge or be taught the material in a different way, perhaps by a more experienced instructor.
However, I suspect that most schools do not allow students to retake courses they have already passed, no matter how poorly the student performed, or how long ago the course was taken, etc.
My question is: what would be a sound reason for this?
From the school's perspective, one reason may be that the student would be at an unfair advantage over the other students. This reasoning however, assumes that there was some measure of fairness to begin with. It is difficult to claim this given the vastly different backgrounds the students have prior to enrolling in a particular course. Even then, the transcript would quickly reveal to a potential employer or an potential supervisor that a course was taken twice or several times. It can probably be said that a course that is passed with a high score/mark the first time is better than a repeated course.
Added:
Since the most common response to my question is: "But I was able to retake courses", please read some of the different policies for various schools and related discussions:
http://www.utsc.utoronto.ca/aacc/academic-advising-faq, https://graduatecollegebulletin.ouhsc.edu/hbSections.aspx?ID=586, https://orapps.berkeley.edu/Registrar/courserep.html, http://artsandscience.usask.ca/undergraduate/handouts/RetakingCourses.pdf https://www.revscene.net/forums/572588-question-about-retaking-courses-limit-etc-ubc-sfu.html, http://calendar.ualberta.ca/content.php?catoid=6&navoid=857