Which is just another one of many pagan beliefs adopted by the church to "accommodate the “pagan masses” that were streaming into the church"...
Origins of the Belief
“In several ancient religions,” observes Jesuit priest Ignace de la Potterie, “virginity had a sacral value. Certain goddesses (Anath, Artemis, Athena) were called virgins.” Yet, what does that have to do with Mary? Catholic priest Andrew Greeley explains: “The Mary symbol links Christianity directly to the ancient religions of mother goddesses.”
Professor of church history Ernst W. Benz comments on this link with ancient pagan religions. “Veneration of the mother of God,” he wrote in
The New Encyclopædia Britannica, “received its impetus when the Christian Church became the imperial church under Constantine and the pagan masses streamed into the church. . . . [The peoples’] piety and religious consciousness had been formed for millennia through the cult of the ‘great mother’ goddess and the ‘divine virgin,’ a development that led all the way from the old popular religions of Babylonia and Assyria . . . Despite the unfavourable presuppositions in the tradition of the Gospels, cultic veneration of the divine virgin and mother found within the Christian Church a new possibility of expression in the worship of Mary.”
But what moved the Roman Church to adapt and adopt the “great mother” goddess and “divine virgin” cult? For one thing, the “pagan masses” coming into the church wanted it; they felt at home in a church that venerated a ‘great virgin mother.’ “In Egypt,” Professor Benz notes, “Mary was, at an early point, already worshipped under the title of the bearer of God (Theotokos).” So the “divine virgin” cult was adopted to accommodate the “pagan masses” that were streaming into the church.
https://wol.jw.org/en/wol/d/r1/lp-e/101985803?q=perpetual+virginity+of+Mary&p=sen