Changes can affect medication stability
Active drugs used in medications are temperature-sensitive.
Drug companies are required to strictly control temperatures during manufacturing.
Most antibiotics are temperature-sensitive.

Illustration by Emily Roberts, Verywell
This is known as a permitted excursion.
These medications are prepared individually for each person, not in high volume like most commercial drugs.
Pharmacists must follow strict protocols.
Often, especially with liquid or injectable compounds, these formulations require highly-controlled storage and transport temperatures.
Otherwise, they may not last as long as most medications.
Many manufacturers will allow you to return the medication in exchange for a replacement.
Summary
Active chemicals in most OTC and prescription medications react strongly to high temperatures.
Exposure to high temperatures for too long can cause a medication to degrade and become ineffective or even harmful.
A Word From Verywell
Medications should always be kept in a cool, dry place.
Add a few ice packs to keep the bag cool, making sure that your medication also stays dry.
2009 Feb 25;8:33. doi: 10.1186/1475-2875-8-33.
Hodel EM, Kaur H, Terlouw DJ.Stability of Dihydroartemisinin-Piperaquine Tablet Halves During Prolonged Storage Under Tropical Conditions.
Am J Trop Med Hyg.
2017 Feb 8;96(2):338-340. doi: 10.4269/ajtmh.16-0759.
Epub 2016 Nov 28.
Am J Health Syst Pharm.
2016 Jul 15;73(14):1088-92. doi: 10.2146/ajhp150501.