I lost 70lbs in 7 - 8 months by simply cutting carbs. Then I stopped for a few months and gained 20lbs, but I was eating like I did in my 20s. Now I still low carb, but I'll make some real pancakes on the weekend and eat carby side dishes if I'm at a BBQ or something. And I did it all without exercising, although towards the end I felt a little thin and susceptible to getting my ass kicked, so I started body weight exercises. Reduced that to just chest exercises, cause looking the part is deterrent enough. But exercise is kinda overrated for weight loss. You're still gonna need to diet, as exercising alone to burn fat requires serious effort.
Exercise is important for overall health (strength does matter, you don't have to be bodybuilding, but building muscle is important and can straight up save your life). You might have lost weight, that doesn't mean you absolutely improved your health or are healthy (although I'd say you did a good job in your instance, but just focusing on weight can be damaging). There's a lot of people that actually hurt their long term health by focusing on just losing weight.
That's why weight focused "health" indicators are bullshit, they don't actually do jack shit to indicate real overall health. It can give you an idea, but it's a lot more complex than just weight.
People shouldn't be "dieting" they should be making long term changes that they can maintain. Now if you're seriously unhealthy a major change might be necessary (although it should be limited to cutting out wholly unhealthy foods like high sugar stuff, etc), but gradual changes to your diet are easier to keep and that will be better for long term health.
A lot of people get stuck in yo-yoing in weight because they diet and then stop which functions like binging. This is actually an established phenomenon, although I can't recall what term they call it now, but a lot of people trying to lose weight end up like that and then give up because they struggle to keep the changes or they focus on dieting in the spring for summer, and then resort to poor eating habits in the fall/winter.