At a busy deli counter, there's a little machine with a red button. Press it, and out comes a ticket with the next number on it.
The machine doesn't print a thousand tickets first thing in the morning and pile them on the floor. It works out one number, when someone asks, and then waits.
Python functions can work like that machine — handing out values one at a time instead of building everything up front.