Of all domesticated animals, the sheep is the most dependent on its owner for its well being. That is important in understanding the perspective from which this psalm is being written. They are timid. They are easily scattered. Sometimes they are downright recalcitrant in preferring inferior pastures.
Sheep will always worry a fence. No matter how good the pasture is on their side (they could have good, deep, green grass on which to munch), yet somehow or another they still want to get up against the fence, rub against it, and try to break through. Even if on the other side there is practically nothing but desert, that is where they want to be. Sheep are going to try to break out. It just seems to be in their nature to lean against the boundaries, see if they can push it a little further out, and maybe even break out from the constraints that they feel even though they are being well fed.
David—being a shepherd, understanding sheep, understanding shepherding—wrote this psalm from the standpoint of the sheep. What we have here at the very beginning is a bragging exclamation. It is as if he is talking to his neighbor's sheep across the fence. He can see the sheep is not having such a good time because his owner, his master, is not as attentive, not as industrious, not as caring about his sheep. So the sheep looks at the neighbor's pasturage and its shepherd and says, "Boy, the LORD is my shepherd!" He is bragging because he recognizes the superior care that he is getting.
We have to apply these things to our lives and recognize that our Shepherd is the Creator. He is the wisest, most powerful, most balanced Being that has ever been. And I belong to Him because He deliberately chose me.
Most of the time shepherds with small flocks cannot afford to buy great masses of sheep. They will not buy a whole herd. Rather, they buy their flock individually or in twos, in threes, or fours, or fives. The lambs they usually do buy are deliberately chosen after careful scrutiny and then added to their flock. They go over them individually—rubbing back their wool, checking out their legs, hooves, teeth, and ears—because they want to see that they are getting what they are paying for.
And so it is with God. God says, "You have not chosen Me, but I chose you." No one comes to the Father except by the Son. "No one comes to the Son except the Father draw him and I will raise him up at the last day," is what Jesus said.
If this psalm is going to apply to you, personally and individually, you have to recognize that you were deliberately chosen out of this world. It was a decision on the part of God. He said, "I want that one to be My sheep." He begins to draw you to be a part of His flock, of His work.
What that does is eventually make you and me the object of His attention. The way the Bible puts it is that we are the apple of His eye. It means we are the focus of His attention. Certainly there are billions of people on earth, but we are in the focus of His attention. There is no better way that the Hebrew can express that than to say we are the apple, meaning the pupil, of His eye. Everything that He has purposed for us is done in a deliberate way.

