Let's be sure we understand first off that the gift-giving Magi are not given imitation by the Buying season that precedes Christmas. The Buying season may follow the calendar roughly for the Advent season, and both might be termed seasons of preparation, there is no real similarity. The Buying season is about acquiring. Even when it's for the purpose of giving, it's prerequisite is acquiring. The Magi are moved spiritually, seeking to celebrate and honor the new life promise - totally different.
God's gift of a child is usually seen as a blessing. Yet both scriptures show God providing the gift which others see only as a threat.
In Exodus, the amusing subversiveness of the midwives in dealing with Pharaoh who wants male Hebrew babies killed shows how God uses the faithful over against the arrogant, insecure, and powerful. We see in Pharaoh how the gift of God for his covenant people produces fear as the gift - God's act - is seen as threat.
In Matthew, the naive Magi seek the new "King of the Judeans" in Jerusalem, setting off alarm bells in the court of King Herod. Scheming to use the Magi to identify the potential threat, it backfires. Herod dispatches a death squad to simply kill all the male children in and around Bethlehem under 2 years old. (The painting pictured above is titled "Massacre of the Innocents" by Leon Cogniet.)
When God acts, things change, and the disruption can disturb the folks who like things just as they are, who created the conditions of their comfort and security, the wealthy and powerful.
Check out the whole sermon in the video below, and note the downloads below the video panel.