Psalm 95 often serves as a call to worship, with its two direct calls (v. 1, v. 6) and two really good reasons for worship (we have a great king as our creator--vv. 2-5--and we have a great king who is our shepherd in v.6). But then, the psalm doesn't end. Instead, it shifts to a strong warning against disobedience. The move from worship to warning is puzzling, with its logic not readily apparent on first glance. But there is a link--and it is the sheep. The warning is against people "whose hearts go astray"--which is something that sheep are very good at (Isaiah 53:6). Sheep that are stubborn and rebellious (not listening to the voice of the shepherd; whose hearts are hardened) will not hear the call to worship; they cannot do the basic task that worship requires--which is to kneel in the presence of God, acknowledging his sovereignty, and then to follow.
So, the psalm says to us, "If you are willing to say that you are God's sheep, you must be willing to hear and obey and be led. Don't be the sheep that won't follow the shepherd."