You can certainly get cameras at a better price/performance level. So on a pure financial scale, they are difficult to justificat. But a M is unequaled by definition - it is the only digital rangefinder in production. Not to rave too much about rangefinder photography by itself, that means a very compact full-frame camera (roughly A7 size), but where it stands out is the tiny lenses. Even µFT struggles to match the M lens sizes. And at minimum for my back, lens size matters a lot. A M camera with 3 lenses fits into an absolutely tiny bag.
Yes they make excellent cameras -- particularly the film ones. With care they will last indefinitely. The digital Leicas had some problems at least early on. Maybe they are sorted out by now.
But for the money, you have to just want to own a Leica. The actual camera and optics are no longer unequaled (and for a lot less money) if they ever were.