Cracks in drywall can happen anywhere where drywall is connected to other materials. Temperature fluctuations result in different materials shrinking and extending in different ways, which causes stress and can cause the weaker material to crack. Rooms which aren't properly heated (like most garages) and thus experience greater temperature swings are of course especially susceptible to this.
So cracks like that are usually harmless as long as they don't appear in massive load-bearing walls. They are mostly a cosmetic problem. They can be fixed by filling them with acryl sealant and then painting them over with latex paint. Although this is best done in the spring or autumn when there is an average temperature outside. When you do it while it's cold, the cracks might reopen when it gets hot and vice versa.
If cracks do appear in massive load-bearing walls (as opposed to drywall where the wooden framing hidden behind them is load-bearing), you better call a structural engineer and have them confirm that the building is still structurally sound.