In his case, I think he quit to rest up and recover for the US Open. Federer and Nadal didn’t even go to the Olympics for that reason.
It’s not admirable what he did, and it’s also not admirable what Biles did. The difference is that Biles initially claimed she quit due to her mental health, and then she had her ass kissed and was widely praised for being heroic and courageous when in actuality she quit or choked or whatever happened with her.
It wasn’t a mental health issue, and we now know that. It took a few days for her PR team to come up with this crap about having the ‘twisties’. If that was really the case, why didn’t she just say that in the beginning instead of talking about mental health? She was lying either then or now.