This is mere ray-tracing problem.<p>What we call bright sky is reflections of Sun rays from particles in atmosphere. What we see is reflected light.<p>When Sun is shadowed by Earth we see only light reflected by distant object, such as Moon.<p>The darkness of the night sky is relative - some rays are here, but our visual system is conditioned for days (reflected light), not nights.<p>The idea that everything should be filled with starts is just wrong. Rays from distant stars were deflected, blocked by particles, etc.