If you lose something, you always find it in the last place you search... because why would you keep searching after you found it
But if you are organized, you'll start with the most likely place and progress to increasingly less likely places. When you find it, there's no surprise, and no one gets much of a chuckle over your efforts.
If you don't understand the problem space, then saying "That's the last place I would have looked!" is an expression of exasperation about your lack of knowledge.
I always assumed it was kind of a 'life's a bitch' aphorism