The endocrine gland that primarily controls the body's normal temperature as well as having it set to a homeostatic set point of 37 degrees Celsius is the hypothalamus, specifically, the anterior hypothalamus which primarily functions as a thermoregulator.
This is called a behavioral pattern. This is something deer have learned over time that gives them an advantage in the wild.