Salaam Miracle 114,
You make an interesting point about 40 being a mature age as the Quran actually mentions this in 46:15:
"......[He grows] until, when he reaches maturity and reaches [the age of] forty years, he says, "My Lord, enable me to be grateful for Your favor which You have bestowed upon me and upon my parents and to work righteousness of which You will approve and make righteous for me my offspring. Indeed, I have repented to You, and indeed, I am of the Muslims."
It does make sense as by that time most of us would have grown wiser and have hindsight to look upon as we advance in years.