Why allow such a "bye?"
Because it's not really a bye per se. A "Bye" is awarded to a certain level of seeded player to allow them to advance automatically to the second round of a tournament by virtue of them having attained such a high ranking. By definition, once the tournament begins, no more byes can be awarded, only walkovers.
Why not have a system of "lucky losers" that gives the last (defeated)
opponent of Wawrinka's opponent the opportunity to face Wawrinka in
the third round?
The problem with that logic is, the previously defeated opponent of Wawrinka's scheduled opponent has already lost in a single elimination tournament. So they have been eliminated from the tournament. Would it be fair to force Wawrinka to play this "lucky loser" opponent if Wawrinka somehow got injured or severely fatigued during that match? Definitely not. And what if the player that withdraws only made it to that round of the tournament because their previous opponent withdrew as well? Then who would you advance - the loser of the match two rounds prior? You could technically have first round losers being asked to wait around for 1 or 2 weeks to see if a chain of walkovers somehow advances them to the final. It's just not really feasible since many early-round losers catch the soonest flight out of there so they can try to play another tournament the following week. Not to mention the expenses of hanging around in hotels for the player, maybe their coach, their trainer, etc. Who would pick up those expenses - the already cash-poor tournaments?
This would give defeated players an incentive to hang around for one
more round, for the chance to be a "runner up" in case the winner
can't go on. Also, it would mean that someone wouldn't get a "free
pass" that would put him or her at an "unfair" advantage against other
Just by hanging around another day or two, players could end up incurring expenses that are more than the extra prize money they would earn by "getting lucky" in the case you describe. It wouldn't be worth the risk for many players.
I'm also not sure how much of an unfair advantage it is - I've seen players lose in their match following a walkover because they felt a little rusty or unprepared because of not playing a match in 3 or 4 days. It can cut both ways. It's not automatically an advantage for some players as much as it may seem.