Luke has given us two traditions, one about Zacharias and Elizabeth, one about Mary, and both involve Gabriel and angelic announcements. Now Luke is going to bring them together by telling us about a visit Mary makes to Elizabeth. This cements the blood relationship between Jesus and John. Luke is the only one of the Evangelists who knows about this, and he uses this to blend the two traditions.
Now that Luke has this backstory of John and Jesus, what does he do with it? Essentially nothing, directly, at least. The other Gospel writers seem ignorant of it, and in the Gospel of John, the Baptist actually says that he never knew Jesus! So this is a little like the infancy stories in general. They create this backstory of Jesus, they provide an Israelite foundation, there are these spectacular events: stars, wise men, murder of children, shepherds who tell the story of angels, and then no one knows about this at all later on. It’s as though Zacharias and Elizabeth, Mary and Joseph, never see each other again. The story of this linkage comes to us and then disappears.