At some schools, all the professor knows about the student is what is in the grade book and the letter is indicative of that. Some will at least put the grade book in context.
Very few students demonstrate their character (at least not in a positive way) and their outside of the classroom activities to their professors, particularly at large schools. Professors should write what they know which is quite limited in many cases to the student's quizzes and exams, lab reports, papers, class discussion and questions posed during office hours. At some liberal arts colleges, faculty and students have more opportunities for collegiality outside of the classroom and once in awhile I'll see someone mentioning casual conversations enjoyed with a student at a cultural event on campus, etc. but that is rare.