The University of Washington explains that the endocrine system secretes hormones and other substances into the blood stream in order to control behavioral processes, such as responses to stress. Additionally, the endocrine system controls biological processes, such as appetite, metabolism and growth. According to Wikipedia, the endocrine glands secrete substances directly into the bloodstream. This allows the endocrine system to control distant systems and affect behavior.
According to Weber State University, the hypothalamus regulates hunger, thirst, sexual drive and other motivated behaviors. Additionally, the hypothalamus is part of the limbic system. The limbic system controls aspects of human behavior, such as emotion and memory. The hypothalamus receives some information from the autonomic nervous system. This allows the hypothalamus to monitor the status of the internal organs. Because the hypothalamus operates on unconscious nervous stimuli, it is very important in controlling emotions.
Because the hypothalamus is part of the limbic system and people can change their response to their emotions, behavior can exert control over the endocrine system as well. This, according to Weber State University, is why cognitive behavioral therapy works. While hormones can affect behavior, behavior can also affect the hormones produced by the endocrine system.
Wikipedia states that hormonally controlled behaviors do not occur in the absence of the effective hormone.