My actual passport photo is like that. We were on vacation, sunny place, warm, no pant, only a boxer. And only nature around us, no white wall. So I put on a nice shirt, was still in my boxer, and wife held a white towel behind my face while someone took a picture.
On the original pic you could somehow see that it was a towel and not a white wall but some photoshopping took care of that.
Why a shirt while in underwear? A shirt looks "serious". And real people like that. They like a shirt, it looks serious. As to why the boxer underwear: for the same reason as in TFA.
Next time I'll show up with the complete picture and cut it in front of the person asking me for the picture.