You have to wonder what was going on when this wall was built. Were the owner and the builder still debating floor plans while the lathers were already working the one wall? "You two sort it out, I have work to do". Or was the bathroom originally much bigger and the pantry, which is behind this wall, an afterthought?
Of note, this is not the only wall with 4x2s (rather than 2x4s) in the bathroom.