The "how" part of this question is quite simple. Nature is compared to a mother who loves us and knows what is best for us. Nature is shown taking our toys (the joys of this life) away from us and leading us away to bed (death). Nature is shown as someone who knows better than we do what we need.
As for the "why," I think it is because Longfellow's main goal here is to reassure us about the prospect of death. There is nothing more reassuring than the metaphor of a mother leading a child -- it is the epitome of protection. So, by using the image of a mother, Longfellow is reassuring us that we need not fear death.
The theme of Henry Wadsworth Longfellow's (1807-1882) sonnet "Nature" is the tenderness and gentleness of 'Nature' in guiding human souls from this world to the next.
He has synthesized and synergized the thematic metaphors in a compelling manner to effectively convey this theme.
The two metaphors in the octave [the first eight lines] 'a fond mother' and 'her little child' are harnessed in the chronotope of the arrival of the bed time of the child. Death in this world is compared to the bed time of the child. Just like how the child would like to continue playing forever with its toys without going to bed, adults also would like to continue to be busily engaged forever in their mundane activities without any thought of a higher reality.
But the kind and affectionate mother knows how essential sleep is for the good health of her child and very gently coaxes the child to leave its "broken playthings" behind and puts the child to sleep. Similarly, death very gently leads us away from all our earthly attractions and distractions and leads us into the mysterious but higher "unknown."
The "fond mother" knows that sleep is essential for the good health of its child, and so she gently coaxes the child to go to bed, similarly "Nature" knows that death or eternal rest is essential for the spiritual health of the human soul so that it can take eternal rest in a higher reality and it also
takes away Our playthings one by one, and by the hand Leads us to rest so gently
Longfellow's conception of death leading adults to a higher and mysterious reality is platonic and agnostic. It is not a Christian view of life after death in which sinners will go to hell and the righteous to heaven. Longfellow's views on the 'after life' in this poem are non-judgmental and apply to all humanity.