Or Matthew borrowed the phrase from Mark's account of feeding the 5000. It works either way around, it seems to me.
If we go back to the Griesbach hypothesis regarding the sequence of the pericopes, I think what happened is that Mark was following Matthew at the point where he describes the rejection at Nazareth (Luke brought this pericope forward to the beginning of the ministry). Mark then notices that both Matthew and Luke are about to be in sequence with the story of Herod being perplexed thinking Jesus is John the baptist, followed by the beheading of John and feeding of the 5,000. So Mark briefly follows Luke by describing the mission of the apostles (which he omitted before when Matthew had it), before giving an amplified account of Matthew's version of John the Baptist's beheading. He then returns to Luke, saying that the apostles reported back to Jesus. Then he conflates Mt's and Lk's accounts of feeding the 5,000.
By combining Luke's account of the mission of the 12 with Matthew's lengthy account of the beheading of John, Mark has successfully created a break during which the disciples are off preaching and healing. However, at the point at which he joins the two (Mk 6:14), the line of thought is broken: "And King Herod heard (about the disciples activities, parallel to Luke's "And Herod the Tetrarch heard of all the things being done"), but then Mark says, "for 'his' name had become well known", which is parallel to Matthew's "At that time Herod the tetrarch heard the news of Jesus".
Then Mark follows Luke's threefold description of who people thought Jesus was, before returning to Matthew's account of the beheading of John, at which point he repeats himself: "And Herod having heard...".
By calling Herod 'King', and amplifying the role of Herod's wife in John's death, Mark may be linking him with King Ahab, who took Naboth's vineyard after his wife Jezebel had him killed.
Following that event, the prophet Micaiah prophesied Ahab's death, saying he saw Israel 'like sheep without a shepherd' ie without a king.
Following the account of John's death, Mark returns to Luke saying that the apostles returned, and Jesus took them to a solitary place to rest. This does not flow as smoothly as in Matthew, where it is because Jesus hears about John's death that he withdraws to a solitary place with the disciples. Mark's conflation has created interruptions in the flow of thought.
At this point Jesus has compassion on the crowd. In Matthew he heals the sick, but Mark may be associating Herod's treatment of the sheep with Ahab's, and then showing that Jesus is the good shepherd who feeds his sheep.
Ezekiel 34 is about God's judgment on the shepherds of Israel. This chapter highlights the need for a shepherd who goes after lost sheep, heals wounded sheep and feeds hungry sheep. Matthew brings this out in 9:35; 10:6; 14:14,16; 15:30-32; Mark in the basic act of feeding the crowds.
If Mark's aim was to link Herod with Ahab, he must have been building on a source or sources which have already shown Jesus to be the shepherd and creating another theological layer to the story. This is confirmed by observing the interruptions in Mark's line of thought as he conflates two sources with different sequences.