You were lucky to spot him before he’d found a hiding place! I had one sneak in once and I never knew it was there until I heard a noise, went to investigate, and eventually found it behind the dishwasher. They are World Hiding Champions after all. Never play hide & sneak with one, you WILL lose.
It may not have been after the milk, it may have just been curious. They are stupidly curious and do get themselves into scrapes just because “oh, that looks an interesting place to go”. I do religiously keep the doors closed now. I’m glad yours was fine.