It was totally scripted, either that or they just practiced the exact same route twice.
The Last of Us was on Jimmy Fallon's The Late Show and they played a demo, which turned out to be exactly the same as the E3 demo. Like literally exactly, to the point where I almost thought it was just a recording and he pretended to play. Its worth noting that either Bruce Straley or Neil Druckmann played, not Fallon, lol.
If you watched the videos side by side. You will notice that the camera angle isn't the same. And Joel had more ammo in the Fallon demo.