Setting circumcision aside, AFAIK anesthesia is not possible when doing surgery on infants, so with serious conditions, it's either operate without it or nothing.
Therefore, believing they don't feel pain is a matter of expediency allowing doctors to save lives.
We routinely anesthetize infants with either local or general anesthesia. Here is a 2015 discussion from the American Society for Anesthesiology comparing regional with general: “General anesthesia safe for infants, does not impair neurological development, study finds” - https://www.asahq.org/about-asa/newsroom/news-releases/2015/...
Therefore, believing they don't feel pain is a matter of expediency allowing doctors to save lives.