That’s a misconception. Yes, on some level, we prefer mates who will be healthy and fertile, but that is a consequence of natural selection, not a cause.
Organisms don’t think about how healthy or fertile potential mates are. They just experience the feeling of attraction and arousal. Anything more would actually be maladaptive.
So what is it that’s causing that feeling of attraction and arousal? Clearly it’s a relative match between a template that has been selected for and some external stimulus. That template has been selected for because organisms that match it tend to be healthier and more fertile, but the organism itself doesn’t need to know that.
Now, a stimulus that bears a closer match to the template will require less effort to encode than one which deviates more from it. So it turns out that you and I are basically saying the same thing, just at different levels of abstraction.