Since you are specifically asking about stopping on the runway prior to take off, this would be because the tower told the pilot to “Line Up and Wait”
The pilot enters the runway, lines up on the center stripes, powers down to idle, and applies the brakes.
This is done because the plane that took off before left “wake turbulence” behind him and this delay allows that turbulent air to settle down to the ground (or below your climb route)
Air Traffic Controllers also must provide spacing between the plane taking off and the next one, and so if no one is landing in between take offs, they will have the next plane “Line Up and Wait” and once the time (or distance) has elasped, will then tell the next plane “Cleared for Take Off”
[Edit] A couple of examples I forgot in my original answer
In is common at large airports which have intersecting runways that there may be a plane taking off from one, and another plane “Lined Up and Waiting” on the other runway. As soon as the first plane crosses the intersection, if no “Wake Turbulance” needs to be address, then the other plane can start his take-off
In the above image, if plane A had waited for plane B to land first, then plane B would not have had to wait for the Wake Turbulance to subside. So the tower could have told Plane A to “Line Up and Wait”
Another case is where a plane has been cleared to cross the runway further down and the plane taking off needs to wait for the other plane to cross the runway. Once the other plane crosses, then the tower would tell the planing waiting, that he can take off.
Strange example, I once was cleared to “Line Up and Wait” in my T210 at a small towered controlled airport with no one having left before me. This was odd, but the controller explained a C-5 Galaxy was crossing over the airport at a low altitude.
I was fine to sit there for 3–5 minutes. Hitting the wake turbulence from the C-5 would have damaged my aircraft and perhaps caused a crash. But this is not a typical reason.
Cessna Turbo 210L similar to mine.
Almost exactly what my view of the C-5 Galaxy crossing over the runway was.