All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
No one in our time can ever reach the refined status that Maryam (Mary), may Allaah exalt her mention, enjoyed in the Sight of Allaah, the Exalted. It was something permissible according to the legislation of the people of Maryam's mother that a person exclusively devotes his or her unborn child to the purpose of worshipping Allaah Almighty and serving His house without being distracted by any worldly affairs. In doing this, they lost the privilege of benefiting from the child in any way, even by means of enjoying hisher company.
In the Islamic Sharee'ah, however, it is impermissible for parents to make a vow to devote their child because this child is free and not a slave. Even if the child is a slave, he cannot be a slave of his parents. Such a vow is impermissible unless the parents vow to give up the privilege of enjoying the company of their child. This is the acceptable vow of the righteous people concerning their free child, as suggested by Ibn Al-‘Arabi .
Moreover, the concept of worship in Islam is not limited to performing acts of worship or serving the houses of Allaah Almighty. Rather, it extends to include all walks of life, as long as they conform to the Islamic Sharee'ah and are prompted by a sincere intention.
Therefore, a Muslim should not limit himself to performing devotional acts of worship and abstain from working and earning a living seeking the Grace of Allaah, the Exalted. This would be a form of monasticism, and Allaah, the Exalted, blessed us with what is better than it, i.e. monotheism.
There is no doubt that when parents strive to instill virtue and righteousness in the hearts of their children; teach them to worship Allaah, the Exalted; and urge them to acquire knowledge, teach it, and serve Islam and Muslims, they will enjoy a high rank in the Sight of Allaah, the Exalted, and in the sight of people as well. They will surely reap the fruits of such an attitude in the Worldly life and in the Hereafter as well. The Prophet, sallallaahu ‘alayhi wa sallam, said: "When a man dies, his deeds come to an end except for three things … a virtuous descendant who prays for him (for the deceased)." [Muslim]
As for the questioner's inquiry: "Why did Allaah, the Exalted, choose Maryam (Mary), may Allaah exalt her mention?" The answer to this is that Allaah, the Exalted, creates and chooses whatever He wishes. He is not questioned about what He does, but they, (i.e. human beings) will be questioned. No one can ward off His Decree, and no one can adjust His irreversible judgment.
Allaah Knows best.