If the receiving side is able to generate the same series then how is it still random ?
Exactly, and it wouldn't be. But these days we can generate a key stream either in the middle of the two parties (shouldn't use Alice and Bob any more), or at one end, and then securely distribute to both/the other on the fly.
This is called quantum key distribution. Fundamental physical principles (the Observer Effect) mean that even though the key stream is whizzing past a belligerent observer (张三), the good parties will know whether the stream has been intercepted. It's a big subject with big budgets allocated to it, so I'll just include the above link and leave it there for now.