The formation of absorption bands and the distribution of photon optical paths in a scattering atmosphere