"The...reason why the Sacred Heart is truly the Heart of Mary is that the Eternal Father, having considered the Blessed Virgin from the very instant of her conception as the one chosen to be the Mother of God, gave her from the first moment of her life a love similar to His love for His Divine Son. According to many theologians, Mary had more love for Jesus at that moment than all the Seraphim will ever have. Therefore, Mary's incomparable love for Jesus drew Him into her sacred womb and into her heart to rest there eternally as the Heart of her Heart and as a Divine Sun that sheds its celestial light into her soul and inflames it with divine fire.
"...She cooperated with the Blessed Trinity to form the human Heart of Jesus, which was formed of her virginal blood. The blood of her holy Heart passed into the Heart of Jesus and received the perfection that was needed to form the Heart of the God-man. This divinely human and humanly divine Heart dwelt in the sacred womb of Mary as a furnace of divine love, a furnace which transformed the Heart of Mary into the Heart of Jesus and made these two Hearts but one and the same Heart in a unity of spirit, affection and will."
Source: The Sacred Heart of Jesus by St. John Eudes