Ice is also widely recommended to aid recovery for athletes, despite it having a negative effect on post-exercise adaptation. People widely recommend incorrect stuff to athletes all the time.
Ice is good for muscle recovery immediately after strenuous activity. Within minutes is best, up to an hour or so is still effective. After that you need warmth.
Strenuous here means lifting your one rep max, running 20 miles, breaking a personal best sprint time, that sort of thing.
I can attest from personal experience that ice bath right after exercise works in these cases. I’ve even tested it by icing just one leg and not the other. There is a marked difference in recovery by next day.
Ideally you ice the muscles right after workout then put them in a compression clothing so they’re extra warm for the next several hours.
I think the idea is that you performed the exercise to create stress that you want your body to respond to by getting stronger / more aerobically fit etc in some way. So by icing, yes, you recover better, but by reducing the stress you reduce the adaptations.
Imagine you could perfectly recover with some intervention. Then weight lifting no longer works!
For examples like the ones you listed, peak performances where you’re not concerned about gainz and maybe even have to perform again soon after, it makes a lot of sense to do anything to recover quickly.