A key optimization in the sieve is starting each prime's elimination at p² rather than 2p. This works because every multiple of p smaller than p² has already been eliminated by a smaller prime.
Consider p = 5. The multiples 10, 15, and 20 equal 2×5, 3×5, and 4×5 respectively. Since 2 < 5 and 3 < 5 and 4 = 2×2, these were crossed out when processing 2 or 3. The first "new" multiple is 5×5 = 25.
This optimization explains why only primes up to √n need processing. For n = 100, we check primes up to 10, meaning 2, 3, 5, and 7. The next prime, 11, has 11² = 121 > 100, so all remaining unmarked numbers are already confirmed prime.