This usually boils down to whether any pitchers are available (not explicitly resting or resting via the auto-rest feature) and the Minimum Inning Available setting. If sparky runs into a situation where he wants to pull the pitcher but there aren't any non-resting pitchers or any available pitchers able to enter the game (i.e., the current inning less than the Min. Inning Available setting), then he must keep the pitcher in until he exceeds his pitch count or the inning advances.
To avoid this situation, always try and make sure you have pitchers able to enter the game at any time or staggered throughout the game.