Thomas Aquinas notes that what one desires has two-fold ends; the thing you desire, and attainment of the thing. For example, a miser desires money and wealth.
This Beatitude says the poor in spirit will attain heaven. The poor seek mercy. And the poor of spirit seek mercy from God. Children can be counted among the poor. Children live upon the mercy of their parent. The poor in spirit are children of God whereby they are of heaven.