The shepherd did the one thing that enabled the dire prophecy of the Delphic oracle to eventually come true. When Oedipus was born, the oracle had predicted that he would grow up to kill his father, the king Laius, and marry his mother, the queen Jocasta. To prevent this, Laius and Jocasta gave the baby to the shepherd to get rid of him. Instead, the shepherd took pity on the baby and gave him to someone else to bring up. In this way, the shepherd's actions ultimately led to the fearful prophecy about Oedipus coming true. If the shepherd had killed the baby, as ordered by Laius and Jocasta, Oedipus could not possibly have grown up to fulfill the terrible destiny predicted for him by the oracle.
Somewhat paradoxically, then, the shepherd's act of kindness in saving the baby leads to terrible events. When interrogated by Oedipus, who is at last hell-bent on learning the truth about himself and his parentage once and for all, the shepherd admits he simply couldn't bring himself to kill the baby and instead gave him up to another shepherd to rear:
I pitied the little baby, master,
hoped he'd take him off to his own country,
far away, but he saved him, saved him for this, this fate.
Here, it seems rather as though the old shepherd is attempting to deflect blame from himself onto the other shepherd for not taking Oedipus far away when bringing him up. It is useless for all those involved to try and deny responsibility, however. They were all fated to play their part in the inexorable drama of Oedipus, which more than any other acts as an illustration of the the tragic inevitability of fate. Neither Oedipus nor those around him could do anything to avert the grim destiny in store for him. He was destined to kill his father and marry his mother, albeit unwittingly, and everything that happened once he was born tended towards that end.
Human beings are shown to be powerless in this story, at least in the sense of averting what is ordained for them. However, this does not mean that they cannot act. Oedipus shows himself to be the most courageous when he insists on finding out the truth, horrible beyond words though it may be for him. He could have shrunk back from the revelation; he does not. It is the shepherd who reveals the last and most crucial bit of evidence. Therefore, although ostensibly a minor character in the play, the shepherd has a pivotal role in the harrowing story of Oedipus.