The new testament is full of ideas and teachings from the old testament. Many of these ideas we're taken from Canaanite, Babylonian and Egyptian religious practices. Baal Hadad, Marduk both battled the choas monster and so did Jehovah. The first two like other before them we're promoted for their acts to the highest God position lord of lord king of kings. This was also done with the Jesus story.
But also in these old religions their was still reverence for the Creator Gods ,mother and father. Isis and Osiris in Egypt, El and Ashurah in Cannan and so on. Jehovah is the father god and Mary represents the mother goddess, Isis, Ashurah, Inanna. This is why the catholic church has so much reverance and worship for her. I believe the new testament writers we're trying to fit the father mother and son idea as well as the son becomes exalted all in to the new writings. Jesus the son gets exalted for dieing for our sins but also defeating death and the serpent of choas/evil and so become lord of lords God of gods. By the end of the last book of Revelations he's now the alpha and omega just like Marduk. Then their we're many I believe redactions and other changes made by the church from the early 300s AD on, so now we're left with a convoluted mess of a book called the Bible.