That's not a tan line. It's a sun-burn line. He fell asleep in the sun earlier that day and got a really bad sun burn.
He's holding the shorts up to A) demonstrate the difference between the sun burned areas and his otherwise pasty white this and B) to keep his shorts from touching the burn line. He's trying to be funny and it was, but I'm not sure that's apparent in the picture.