I don't have a cleaning scenario that involves a wheel out without the chain coming off too.
My chain only comes off to be replaced. And wheels only come off on disc bikes for the reasons I mention above. Rim brakes....not a problem, any lube contamination on the rim doesnt really matter. On discs even a slightly greasy fingerprint can cause issues.
If you use on of the really light lube & clean fluids like Rock and Roll Absolute dry, then you have to soak the chain then turn the cranks and it will end up on your disc eventually....despite what Zigzag says. I've had it happen quite a few times which was the principal reason for getting a chain keeper.
Now that it is autumn and I'm using a heavier lube (Rolls Pro or Synlube) it sticks to the chain well, and you just need to slowly drizzle and turn chain every now and again so the contamination risk is lower.
However, I still think it is good practice for my cleaning regime to remove the wheels, as I use MG Chain Cleaner to clean the cassette and I like to angle the wheel to limit water and chemical ingress.
Everyone has their own way of doing things and I'm always open to others suggestions*. What I will not accept is somebody telling me that what has happened to me is an impossibility.
* except mattc's