From William Hendricksen Commentary on the Gospel of John, pg 122
Very clearly, people cannot make themselves sheep[6:39,44,10:29]; sheep do not hear a voice unless that voice has gone forth first of all, and sheep do not follow unless the shepherd has first pushed them out of the fold and has gone on ahead of them[10:3,4].
The sheep are not passive. Indeed not! They listen; they follow. But the action results from the gift.
They themselves are the gift of the Father to The son. That thought is stressed in this very context.[vs29]
In His Commentary on Mt 25, pg 888;
It is surely wonderful and comforting to observe that before the good deeds of the sheep are mentioned[35,36] emphasis is first of all placed on the fact that the basis of their salvation, hence also of these good deeds, is their first having been chosen from eternity: The kingdom has been prepared for them, and not just recently, but from the founding of [or the foundation of] the world.
Whether the phrase [from, etc.]is used, or before, etc. [Eph1:4]., the result is the same" from eternity"
The good pleasure of God Triune, His sovereign grace, is the foundation of their salvation.