John Calvin helps us understand how it was that Thomas, one of the twelve, didn’t finally fall away from faith even as he doubted (see, John 20:24-29):
. . . the infinite goodness of God prevents the elect from falling so low as to be entirely alienated from God. We ought, therefore, to be most zealously on our guard not to fall from faith; and yet we ought to believe that God retrains His elect by a secret bridle, that they may not fall to their destruction, and that He always cherishes miraculously in their hearts some sparks of faith, which He afterwards, at the proper time, kindles anew by the breath of His Spirit (Calvin’s Commentaries, vol. XVIII, p. 276-77).