As per our dharma, The devas/Gods who are in the external world are within our human body also like Agni (God of Fire) is in our stomach. Vayu (God of Wind) is in our Breath/Prana. Likewise our ancestors (vasu, Rudra and Adithya) are in our body in the form of hair in our head and face.
During the auspicious days we need to get the blessing from our forefathers, Amavasya and Srardha are the offerings to the forefathers. That is the reason we must not cut our hair/shave during Festivals/Auspicious days, Amavasya and Srardha day.
I also think that is why the husbands are asked not to cut their hair/shave when their wives is pregnant until the child is born.