The mesh lining in swimming trunks serves to provide both support and modesty. It's designed to be comfortable for swimming and lounging.