If you want to understand
why God wrote into the natural law that sex must be unitive and procreative, you need a
theological answer. If something is the natural law, you can’t explain why it is so through the natural law as well, or you run into tautologies.
Sexual intercourse mirrors the Trinity: Father loves the Son, Son loves the Father, and the mutual love between them gives rise to another person, the Holy Spirit. The parallel is: Man loves Woman, Woman loves Man, mutual love results in another person…child.
Sex also mirrors the final
unity of each soul to God (in the Beatific Vision). God, who is the initiator (as St. Paul says, God loved us first) is parallel to Man, who is physically the active agent in the sexual act. Woman is parallel to humanity, which receives the love and loves back. So it is a symbol of this ultimate destiny. However, it is also the means by which most people will reach this final destiny; Marriage is the most common vocation, by which people learn to selflessly love. By loving our spouses and children which arise from the union, we love God and are united to him. Being open to children also involves sacrificial love.
Best recommendation to learn more about this is
Theology of the Body by St. John Paul II

Hope this helps, God bless.