If a university blocks someone who is capable, but lacking pre-reqs, from taking a course there is no real cost to them, and little to the student. (At least for me there were more courses I was interested in taking than I had time to take.)
If a university lets someone take a course without pre-reqs, and that person lacks the required foundation and does badly in the course, it's bad for the student (time wasted) and bad for the university (disruptive to the course, bad in University ranking exercises).
Pre-reqs are not perfect, but it's also hard to assess what all potential students are capable of before before taking a course in the same way that job hiring is difficult. So they are a reasonable approach.
I ended up getting to know one faculty member and having them back me up when I needed it, but it was still a bureaucratic mess every time. Meanwhile in my own major’s department, anyone could basically sign up for any class freely, as long as they agreed to accept the consequences of not being prepared enough.
If retaking a prereq is a huge boost for you, you didn't learn it well the first time.
In many of my early college classes, there were people who already knew most or all of the material and were just there because they had to be.