Most commoners back in the old days did not die in their 40s. Back then, if you managed to survive long enough to become an adult, chances are you’d live to be about 60 or so.
The trick was surviving long enough to become an adult. The infant mortality rate was much higher than it is now. There were no antibiotics, so diseases often killed the weak, which were children and the elderly. Women would occasionally die in childbirth, and men would often die in war.
If you average it all out, you end up with an average age of death around 40-ish. But few people were actually dying in their 40s. A lot were dying before 20. If you survived to 20, and didn’t get killed in a war or in childbirth, chances are you’d die somewhere in your 60s.
So your numbers do make sense. Chinese Emperors inherited their titles, so an Emperor could die in childhood. People didn’t inherit the title of Buddhist monk. You didn’t become a Buddhist monk until adulthood. So the average age of a Buddhist monk would not include the large percentage of deaths from those who died before becoming an adult.
The average age of carpenters was probably in their 60s. The average age of candle makers was in their 60s. The average age of farmers was in their 60s (Edit - probably not farmers, because children became farmers and could die on the farm, so scratch them off of the list). The average age of fishermen was in their 60s. The average age of anyone who lived to adulthood and managed to choose a profession was in their 60s. There’s not much special about Buddhist monks, though they might have a slightly higher life expectancy just because they tend to segregate themselves in temples and therefore might avoid some of the plagues and things that tended to kill the elderly.
That’s the thing about averages. People weren’t dying in their 40s. They were dying before 20, or after 60. But if you average those out, the average was in the 40s.