The Parable of the Good Shepherd in John 10 (NASB1995): 1 Truly, truly, I say to you, he who does not enter by the door into the fold of the sheep, but climbs up some other way, he is a thief and a robber. 2 But he who enters by the door is a shepherd of the sheep. 3 To him the doorkeeper opens, and the sheep hear his voice, and he calls his own sheep by name and leads them out. 4 When he puts forth all his own, he goes ahead of them, and the sheep follow him because they know his voice. 5 A stranger they simply will not follow, but will flee from him, because they do not know the voice of strangers. 6 This figure of speech Jesus spoke to them, but they did not understand what those things were which He had been saying to them. 7 So Jesus said to them again, Truly, truly, I say to you, I am the door of the sheep. 8 All who came before me are thieves and robbers, but the sheep did not hear them. 9 I am the door; if anyone enters through me, he will be saved, and will go in and out and find pasture. 10 The thief comes only to steal and kill and destroy; I came that they may have life and have it abundantly. 11 I am the good shepherd; the good shepherd lays down his life for the sheep. (The parable continues with verses 12-18). 

Jesus was narrating a parable illustrating certain arrangements and conditions. Every sheepfold must of necessity have a door or gate, and this would be for the use of the shepherd and the sheep. 

As stated in verse 1, any person attempting to enter the sheepfold in any other way than by the door would be a thief and a robber. Our Lord Jesus, as the “shepherd,” by fulfilling the terms of the Law Covenant, entered the “door” and secured all the blessings and privileges which had been promised in the Law. The Scribes and Pharisees–“the thieves and robbers”–on the other hand, had been endeavoring to “climb up some other way,” by a hypocritical observance of the letter of the Law, rather than by a heart observance and fulfillment of the spirit of the Law. Jesus as the “Good Shepherd” laid down his life for the “sheep.” The Scribes and Pharisees neglected the interests of the people and were engaged in seeking their own gain–wealth and fame–while piously posing as religious leaders.

Additional Resource:
Christian Questions Podcast
Episode #1242: “Is the Lord Really My Shepherd?”
The amazing, little-known details of shepherding that show us God’s love
Preview Video
CQ Rewind Show Notes