Because of a phenomenon called Rayleigh Scattering, which occurs when sunlight interacts with molecules in the atmosphere and particles from dust. This scattering causes light to be scattered into all directions including upwards forming what we see as the beautiful azure sky.