A key schedule expands a block cipher’s short master key to make the cryptosystem dramatically more difficult to attack.
If a block cipher of just 40 and 256 bits in length uses the exact function, or similar functions, for encryption and decryption it is classified as a “weak key” that is vulnerable to attacks. Weak and somewhat weak keys use some form of expansion methods to lengthen and diversify the iteration of rounds where data is encrypted/decrypted. Such expansions lengthen the key (to become “expanded keys”) into the thousands of bits.
Product ciphers, as some are called, such as the Data Encryption Standard (DES) and Advanced Encryption Standard (AES) use some combination of key expansion techniques that influence the key schedule. These techniques include substitution, permutation, and modular arithmetic.
“Block ciphers have a way of increasing the security of their otherwise-weak master keys. A key schedule expends the key length and difficulty that an adversary faces should they attempt to break the encryption.”