The joke is a pun. Elephants have 'trunks' which is their long nose-like body part.  'Trunks' is another word for swim shorts.  The pun implies that they are wearing swim shorts.
It ' s OK to watch an elephant bathe as they usually have their trunks on .