Yeah, this. Some meds genuinely "go bad" in the sense we use it for perishable produce - epinephrine, insulin, nitroglycerin and some antibiotics come to mind. But the overwhelming majority just lose potency.
But less potent meds can be risky in their own right. Some meds are very dosage dependent. Too low a dose of antibiotics taken over time can lead to building antibiotic resistance and lower their efficiency in the future, for example.