There's not as much overlap with real relationships and a waifu as all that. Everyone fantasizes. About everyday life, about living another life, about the world being different, about getting what we want, about everything turning to dust. We've evolved to do it, because it helps our decision making and prediction skills. It's a thing we all do, all the time, and this obviously includes fantasizing about relationships.
A waifu just acts as a sort of focal point for relationship fantasies, in the same way someone might fixate on their absurd fantasy dream mansion that they've mapped out in their head. It's not a real, tangible goal, and it doesn't replace or even serve the same function as a real house, it's just a way for the mind to give dimensions to it's fantasizing. You wouldn't actually waste your money on that dream home that be impractical and uncomfortable to actually live in, and you can't have a relationship with your waifu, but the idea of it serves a separate personal function instead