Looking at it that way is the only way it really makes sense. Just in an extreme example, let's say Team A wins 5 games against ranked teams at the time they play them, but none end up ranked. And Team B doesn't win any games against ranked teams at the time the games are played, but at the end of the season 5 of them end up being ranked. Are you saying Team A should be credited with 5 ranked wins and Team B zero? Or that Team A's resume should show that they had better wins? That would make zero sense.
Another example....Team A plays a team ranked #20 and beats them, then Team B beats that same team the next week but they aren't ranked because Team A beat them. Only Team A gets credit for a win over a ranked opponent? Again.....dumb.