Why is there a natural longing for God within humans, according to the Catholic perspective?

CCC paras 27-28

Reflection: The Catholic faith teaches that humans inherently desire God because we are created by Him and for Him. This longing for God stems from the fundamental truth that only in communion with God can humans find the fulfillment and happiness they incessantly seek. Throughout history, people have expressed this quest for God through various religious practices, indicating humanity's innate spiritual nature.
Action: Understanding the innate longing for God within me, I will embrace moments of prayer, reflection, and meditation to deepen my connection with the divine. Today I shall seek out 3 brief occasions of silence, wherein I shall thank God for my life, and seek his wisdom and humility so I may receive him into my life. I will nurture my inherent desire for communion with God, recognizing that this is fundamental to my search for truth and fulfillment in life.