The primary function of interstitial cells varies depending on their location. In the testes, Leydig cells are responsible for the production of testosterone, a hormone crucial for male secondary sexual characteristics and spermatogenesis. In the adrenal gland, interstitial cells are involved in the secretion of corticosteroids. In the ovaries, they play a role in the production of estrogen and progesterone.