Perhaps. I tend to think of grades as being some sort of combination of Feedback , Motivation and Gatekeeping (probably in that order). Actually, I don't like grades for Feedback, so perhaps I should say assessment, rather than grades.
But for gatekeeping/ranking, the grade-granting institution can be the same as the applicant-evaluating one (if, for e.g. courses have limited capacity). Hopefully students are chosen on the basis of potential benefit to the student.