Reading main memory is slow, so the CPU keeps recent data in small caches and loads memory in cache lines. Scanning an array in order is cache-friendly; jumping around is not. Big-O ignores this, real timings do not.