This is beacuse it is caused by light scattering of light in the atmosphere. When the moon rises blue light is caused and scattered also caused by earth's atmosphere and it is black on the moon as there is no lunar atmosphere , so no light scattering.