I'm an overthinker too. When I do it, it's generally because I am feeling anxious and insecure and trying to control the outcome of a situation. I am cogitating what I need to do or how I need to behave to get the 'best' outcome for me and the people I care about. Makes me sound like a megalomaniac, but it comes from anxiety, most of the time.