No, I think you’re getting the relation backwards. Many parents who were well educated have the opportunities to send their children to good schools, regardless of whether they went to a good school themselves, because they realize that it makes it easier to be well educated there.
A school's "rating" is merely an average of the quality of education students there receive. It's entirely possible to "get lucky" and have an exceptional teacher or participate in an optional extracurricular that helps them learn more than their peers. And, of course, there's also the chance that the student did well despite going to a bad school, by self-studying.
the best teacher(s) in a 'bad' school overlap with the worst teachers in a 'good' school. Keep in mind that there is a relationship between student and teacher and that clicking with one teacher isn't guaranteed or that after a year of growing up, you might click with a teacher you didn't get on well with the year previous.
Aggregate test scores say more about the student/neighborhood population than the instruction. “Bad” schools become “good” as their neighborhoods gentrify, for example.