It's an old economists' joke. A person out walking at night comes across a man scrabbling on the floor under a lamppost. The man on the floor says he lost his keys. When asked when he dropped them, he replies, "Oh, I dropped them over there, but the light's better here."
The joke is also known as the streetlight effect or the drunkard's search. It's an apt metaphor for how, if we're really honest with ourselves, sometimes we find ourselves working, or searching, or staying in the places where we find it easier rather than the places where we know we ought to be.