Because though the sun emits strongest in the green part of the spectrum, it also emits strongly in all the visible colors โ red through blue (400nm to 600nm). Our eyes which have three color cone cell receptors, report to the brain that each color receptor is completely saturated with significant colors being received at all visible wavelengths. Our brains then integrate these signals into a perceived white color.
If that was the case, wouldn't the moon appear more green?