Why you do it—and how to stop.