I'm gonna chime in: Last time I checked for an international flight, they said you're not allowed to carry unmarked pills. It has to be in the original packaging including that leaflet. If you don't do that, you might be in for an interesting day.
And if you're travelling abroad: Check if that OTC medication is also OTC in the destination country.
Airport security, particularly in the US where many airports have international and domestic departures out of the same terminal, will not care about that. I regularly travel with OTC pills loose in a container and no documentation, and have had no issues.
Where you might encounter problems is on entering that foreign country. While they have never ever given me grief over my OTC medicines, I try to make sure to remember to buy stuff in original packaging to bring. But even then, as long as you are only bringing enough for your trip they probably won't care. Prescription medicines should absolutely be in original containers, though.
It's real hit or miss. I've had TSA search through my daughters bag of Goldfish looking for stuff in a podunk little airport while I'm rushed through in busier international airports.
Example of note: France won’t sell Sudafed, so bringing any might be a risk unless you have a printed and signed rx. That being said, their pharmacies are pretty good. Shoutout to the migraine medication with codeine in it.