It was "played", but it was entirely scripted too. There is a 0% chance you could have went anywhere else in the demo and gotten working AI. Cause the AI was not working at this point in time. It would have been horribly glitchy and pretty much a mess if they used the actual systems that were in place at that time, way before pre-alpha. This is how most E3 demos work, which we discussed here already at length and have several examples. ND isn't a stranger to this as the gameplay demo for the first game worked the same way. It was extremely scripted and they didn't come close for the final game. In Part 2, it was also scripted, but they came significantly closer to their vision, so it's much more forgivable.The 2018 TLoU2 demo was definitely played by someone, it wasn't a scripted scene.
The techniques used to script such a demo we already discussed, but here they are:
-You can move around freely, but the people playing the demo have memorized the correct paths to take for this scripted demo
-Alongside the way there are triggers which initiate scripted events, such as the car dodge fight, which are pre-created animations without user input
-Enemies are invincible until the point they need to die for the demo
-The player is invincible and the health bar is scripted
You can believe everything in this demo was real actual gameplay 2 years before release and looked even better than what we got after 2 years of refinement. Or you can believe in reality of how these demos are made.