A hot shower relaxes muscles and helps the body move back into aerobic energy consumption faster (vs anaerobic burning, which most races force the body into quickly, due to the inability of the swimmer to breathe enough to get sufficient oxygen into their system). This makes physical recovery faster, enabling the swimmer to race again in a shorter time.
It's a easy way to psychologically "come down" from the massive concentration required to swim a race.
It rinses off the slight sheen of sweat that a swimmer develops (yes, swimmers sweat heavily, just like any other extreme exertion), plus also rinses off the residue from the chemically-treated pool water, which dries out the skin and can cause minor skin irritation.