The expiration dates on drugs can be arbitrary and tell us little about whether the drug in the bottle is still OK to use. Most drugs remain just as potent for years, or even decades,
after the expiration date on the bottle. This does not mean that you should disregard the dates; some of them are there for a valid reason, especially antibiotics
(1) or drugs in liquid form
(2). But an organic chemist can take a look at the chemical structure of a drug and make a pretty good guess about whether the drug in a dry tablet or capsule will decompose or remain intact.