Those that fast for so long, why?

Not judging but I’m genuinely curious. I joined this sub thinking people would be fasting 1-2 days or so, but some are trying to fast for a week or multiple weeks or months?

Even if morbidly obese this seems extreme. Why not just fast a day or two a week and eat healthy and exercise on days that you do eat? Or just do 1 meal a day? Multiple posts I’ve seen where they talk about how bad they eat when they do or how little exercise they do.

This isn’t to judge, just wondering the logic behind this all, specifically for those trying to lose weight.