Well somebody made it up because you can’t cure people by spitting on them. In any case, if Mark was precisiing Matthew And Luke why would he put such a thing in? It makes more sense that he wrote first and they took the embarrassing bits out.
Checking the context in Mark and Matthew shows that after the healing of the Gentile woman's daughter, Mark has the one healing of the deaf and mute man, near the Sea of Galilee; Matthew has a statement that Jesus was near the Sea of Galilee and healed many, including mute. This definitely looks like one got his idea from the other.
Matthew 15:28 And her daughter was healed from that very hour.
29And having departed from there, Jesus went along the Sea of Galilee, and having gone up on the mountain, He was sitting there. 30And great crowds came to Him, having with them the lame, crippled, blind, mute, and many others. And they placed them at His feet, and He healed them, 31so that the crowd marveled, seeing the mute speaking, the crippled restored, and the lame walking, and the blind seeing. And they glorified the God of Israel.
Mark 8:30 And having gone away to her home, she found the child lying on the bed, and the demon having gone out.
31And again having departed from the region of Tyre, He came through Sidon, to the Sea of Galilee, through the midst of the region of the Decapolis.j 32And they bring to Him a man who was deaf and who spoke with difficulty, and they implore Him that He might lay the hand on him.
33And having taken him away from the crowd privately, He put His fingers to his ears, and having spit, He touched his tongue, 34and having looked up to heaven He sighed deeply, and He says to him, “Ephphatha!” (that is, “Be opened!”). 35And immediately his ears were opened, and the band of his tongue was loosed, and he began speaking plainly.
36And He instructed them that they should tell no one. But as much as He kept instructing them, they were proclaiming it more abundantly. 37And they were astonished above measure, saying, “He has done all things well. He makes both the deaf to hear and the mute to speak.”
If Matthew copied Mark, then he must have come to Mark's healing story and decided to include it in a list of four types of healing that Jesus did at that point.
If Mark copied Matthew, then he came to Matthew's list and decided to include a full account of one miracle from the list.
Either scenario seems plausible.
The background is Isaiah 35:5,
Then will the eyes of the blind be opened
and the ears of the deaf unstopped.
6Then will the lame leap like a deer,
and the mute tongue shout for joy.