Think of it like this... A marathon runner has already ran 25 miles of their marathon. Somehow they still find the energy to finish that last mile. Just like muscles store energy for the "last leg", self-control is able to do the same thing.
Baumeister, R. F. (2015). conquer yourself, conquer the world. Scientific American, 312(4), 60-65.
Goto, T., & Kusumi, T. (2013). How can reward contribute to efficient self-control? Reinforcement of task-defined responses diminishes ego-depletion. Motivation & Emotion, 37(4), 726-732. doi:10.10078/s11031-031-9356-3