Shorts with mesh underwear lining

Whoever heard of wearing underwear under shorts - with or without a liner.
Incidentally, I have come across plenty of examples of dress shorts with liners and these were certainly intended for neither swimming nor underwear.