This scenario is ambiguous.there could well be and ethical abuse that the instructor is not doing his/her job, but the use of past performance as one input in the grade decision is not inherently an ethical abuse, depending on how one understands grades.
There is not widespread agreement about what grades measure.
Depending on whom you ask, grades might measure:
- how much a student learned in a course
- how much a student knows at the end of the course
- how much effort a student put into a course
- how well students complied wth course procedures
- what a student is capable of doing at the end of the course
And these comparisons could be relative to a fixed standard, or relative to other students in the class ("on a curve").
All of the above have been used in courses I have seen. I'm afraid it seems that grades in a course mean whatever the institution or instructor define them to mean. There are some practices that would be widely condemned as abusive, but grading based on total proficiency and using past achievement as part of that assessment seems to be to be within the realm of defensible practices.
If the standard is an absolute level of proficiency in a body of material, past work in the field is a helpful piece of information about a student's likely level of proficiency. In other words, if a grade in course N is intended to reflect how well a student can do tasks x and y, and tasks x and y require skills from course N-1, then it seems reasonable to use this information.
This is not how I would advocate grading, by the way, but it seems to fall within the universe of acceptable practices. If a professor believed that the only way s/he were comfortable asserting that a student attained the level of proficiency s/he believed warranted an "A" grade were if the student previously demonstrated mastery at the "A" level of prerequisite course material, and also had high overall mastery of other material as demonstrated by a high GPA, this decision strikes me as unfortunate but not unethical.
I would hope an instructor would allow other ways to demonstrate that mastery besides grades in a previous class; this example was unclear whether that was the case. When the instructor told the OP that an A was only in consideration because of past performance, I do not know if this was a general requirement, or the specifics of this case based on other assessments in this class.
If the instructor views grades as a certification to the student's future instructors, employers, clients, etc of the Instructor's assessment of the student's proficiency with course material (far from the only meaning given to grades, but one widely accepted one), then this can be justified as ONE input in the grade decision. Given the set of observations about the student (exams, projects, homework, etc), how likely is it that the student has at least (excellent/good/fair/poor) mastery of course material? If the goal is to give the hugest grade the instructor an justify with confidence level x, past performance is an I out that adds information to the decision function.
If the instructor based grades ONLY on what the OP described, that would be shirking the responsibility of the instructor. If the instructor said that the student's work in this course alone was not enough to definitively convince the instructor that the student was at an "A" level of mastery of course material, but that work combined with evidence of the student's past work raised the confidence level enough to justify certifying to future encountered of the student that the student mastered the course subject, that could be ethical.