The reason that you cannot see stars in the daytime is because of the scattered sunlight that comes from every direction; the scattered light is so bright that the stars can’t be noticed.
But in a deep well or pit, or from a sinkhole in a cave, only the light straight down gets to your eye; not the light scattered from all the other directions. If you can block out enough of the scattered light, you can see the stars.
Source

