Suppose I set up a wallet with a deterministic seed passphrase. I then use it, moving bitcoins around, sending some change to change addresses. Electrum will apparently create more addresses when required; suppose it does so.
I later on 'restore' the wallet on a new Electrum install by entering the existing seed. How does Electrum know how many addresses to create? It may be the case that the original 8 addresses are now empty (0 BTC), and my btc are in addresses created later on. How does Electrum know how many deterministic addresses to create in order to see all of my existing btc?
One possible technique I can imagine: Electrum looks at the blockchain for the first addresses in the wallet. If it sees traffic to those addresses, it knows to keep trying more of the deterministic addresses until it sees no more traffic, at which point it stops generating addresses in your wallet.