When King Solomon came to the throne, God promised him in a dream that He would grant him the blessings he wanted. Solomon asked for "a docile heart, that he might judge Your people, and discern between good and evil; for who will be able to do justice to Your people, to this people so many?" (3 Kings 3:9).
Faced with the humility of this answer, God granted the King wealth, longevity and victory over his enemies, in addition to the wisdom he had wished for. Precisely because he had shown that he preferred to be righteous rather than to enjoy those goods that were not necessary for his salvation, God filled him with all good things.
In effect, some of God's gifts are not indispensable, and sometimes He grants them to us only on condition that we are detached from them. The Patriarch Abraham had the painful experience of this when he was about to sacrifice "his son, his only son, the object of his affection" at God's command, before the angel prevented him from doing so, his fear of God having been sufficiently tested.
Being the husband of Our Lady was not necessary for Joseph's salvation. And yet it surely did not escape his already deep soul that the treasure thus entrusted to him was priceless. Of this treasure, Providence first demanded that he renounce it. Seeing that Mary was expecting a child and that he had no part in this mystery, in order to observe the law without harming his fiancée whom he knew to be pure, he resolved to send her away secretly (Mt 1:19), and it was only after making this decision that God expressly entrusted Mary and the child to him. His already deep affection was thus purified by a courageous sacrifice.
In the same way, Our Lady had renounced the joy and pride of motherhood by dedicating her virginity to God. And God, who does not allow Himself to be defeated in generosity, honoured this by miraculously granting her to be a mother, and mother of what a Son!
Mary was Joseph's treasure, Jesus was Mary's treasure. But both Mary and Joseph sought first the kingdom of God and His justice, and their fullness was superabundant. May they direct our hearts to the true good!