Why Do Muslims Shave Babies’ Heads?
Question

Is the act of shaving a newborn baby's head rooted in Islam? What is the purpose of doing this, and is it referenced in the Quran?
Praise be to Allah.Shaving the newborn’s head is Sunnah on the seventh day from his birth. Samurah (may Allah be pleased with him) reported that the Messenger of Allah (may Allah's peace and blessings be upon him) said: "A child is held in pledge for his ‘Aqīqah which should be slaughtered on his behalf on the seventh day after his birth, and he should be given a name, and his head should be shaved." (Ibn Majah)
Salman ibn ‘Amir narrated that Prophet Muhammad (peace and blessings of Allah upon him) said: "For a boy, there is an 'Aqiqah. So spill blood for him and remove the harm from him." (Ahmad) He said that Ibn Sireen used to say if removing harm from him did not mean shaving the head, then I don't know what it is.
Ibn Al-Qayyim (Allah's mercy upon him) said about the benefit of shaving the newborn's hair : 

“Shaving his head removes the harm from him, 
removes the weak hair so that stronger and firmer hair replaces it and it is beneficial for the head. 
In addition, it comforts the newborn and opens the head's skin openings... 
And along with this is a strengthening of his eyesight, his sense of smell and hearing. (Ahkam al-Tifl by Ahmad Al-’Isawi 192)

Sheikh Ibn Uthaimin said: “It appears that shaving the head on that day has a positive effect on the hair roots.” (Al-Sharh Al-Mumti` 7/540)
And Allah knows best.