Pharmaceutical companies get sued for everything under the sun. Who is going to be first to blame them for trying to limit their liability just a bit.
Pharmaceutical companies do not get to choose what expiration date to put on their products. They are required to put batches of drugs aside for stability testing under various conditions and then submit test results showing whether the drugs remained stable. The expiration date reflects the duration at which the drug product has been demonstrated to be UNexpired. This is controlled by regulation. Stability testing is an expensive process, so companies don't just keep testing indefinitely and resubmitting results. Drugs would never get on the market if companies had to provide 20 years' worth of stability data.
Yes, it is to a certain extent a liability issue