Endorphins act on the same pathway as heroin and other drugs, which can cause physiological dependence, drug resistance and similar addiction behavior in rats and mice. This is why people are drawn to the sun rather than fear the health risk of insolation.