On the NBC live broadcast of the Mixed 4x100m Medley Relay swimming event of the 2024 Summer Olympics, commentator Rowdy Gaines said that it is ideal for men to swim the first 2 legs (backstroke and breaststroke) and women to swim the last 2 legs (butterfly and freestyle).
Looking at the results of the race, 4 of the countries used a MMWW order, and the other 4 countries used a WMMW order. That means all the countries decided to have a man swim the second leg (breaststroke) and a woman swim the anchor leg (freestyle).
Also, looking at the results of the mixed 4x100m medley race at the 2020 Summer Olympics (the Olympic debut of the event), 7 out of the 8 countries used either a MMWW or WMMW order. The United States used a MWWM order and finished in 5th place. The Wikipedia article blames the United States' failure to medal on the MWWM order:
Opting against tradition by using a female breaststroker, the decision backfired massively for the U.S. as they were left off the podium for only the second time in an entered relay event in Olympic swimming history
Why is it a disadvantage to have a woman swim the second (breaststroke) leg and a man swim the anchor (freestyle) leg in a mixed medley relay race?