Key expansion for cryptographic keys I have seen some applications use key expansion when deriving AES-keys.
E.g. the application will generate some random data (e.g. 128bits), then use PBKDF2 to expand it into 512bits (2x256 keys).

Why go through this process of taking a small amount of random and expanding it, instead of taking 512bits cryptographic randomness directly?

The random 'seed' value is not stored either so it can be reused for the key expansion.
The main reason is that true random data is hard to obtain; whether it is from:


A user's password since people only remember them so long
Or from a random source such as an operating system that reads random measurements like disk latencies since it can only produce so much randomness per unit time.