As I understand, key exchange for secure communications like TLS has a client take a server's public key, generate a random AES key and send that as a shared key for further communication. The key is generated using a cryptographically secure random number generator where the seed is obtained via system entropy.
I assume a random generator is used to create the key rather than purely from system entropy because it's faster/easier, but why does the generator have to be cryptographically secure? The benefits of being so are that given any state of the generator, it's infeasible to predict the next bit, or any of the previously generated ones. However, if an attacker can see the output of the number generator, don't they already have the AES key anyway? In what scenario would they only ever have part of the key, which they could then exploit the number generator to recover the rest?
I assume I'm misunderstanding it's purpose.