Why add Aliyyan waliyyullah in azan if the 1st time was in the Safavid era? Did the prophet (SAWW) ever said this?

The first time it was said was during the time of the Holy Prophet. Yes omitting it will not render the Azan or iqama invalid