Wow, this one is kinda tough to answer! For me there are a few things
1) I was unhappy. I've come to face that a lot of my unhappiness with life was really unhappiness with myself. The more I disliked my looks and appearance the more everything around me started to unravel.
2) I tried on wedding dresses. I'm getting married next June so I have a set goal timeframe, non-negotiable, this is it moment.
3) It felt like a last chance. It's my last year in grad school where I have free access to a gym and all sorts of classes and resources. Part of me felt like if I couldn't do it now with all these resources, I'd never be able to overcome the challenges I faced. I might as well make the most of what I have access to since I've realized I won't have this forever.
Great Question - Hope I answered this appropriately. It is a lot of things combined, but no matter what gets you here, it's good to want to take better care of yourself.

Cheers!
~Jules