What's the concept behind neverending arcade games?

Games like temple run or subway surfers. I mean it keeps going like forever unless you hit something. I thought about using very long piece of terrain but wouldn’t that cause bad performance? And someone would probably survive in-game enough to prove that road ends somewhere. Any ideas?

You don’t have one long piece of terrain - you have several small sections of terrain and spawn them (either randomly or following a predetermined pattern) one after another, destroying the previous in the process.