I've been a 20+ year Canon EOS user and since 2001, have owned all of the 1D non-s series cameras. This likely has had some influence on my hardware expectations when it comes to new cameras. So, in late 2010 when I unboxed a used M9 as my re-introduction to Leica M (previously it was a brief spell with an M3 back in ~1992), one of my first impression of it was that I'd just stepped back 10-15 years in digital camera design, UI and capability. Basically, the M9 has a lot of quirks. Though contrary to Victor, I grew fond of its base ISO character and learned how to work around its quirks and limitations. However, it just never felt like a snappy, precision piece of hardware.
I never owned or used an M8, but suspect it and the M9 are functionally very much the same, including the software side.
The M240 leapfrogs Leica back into the 2010s of digital capability and customer expectations. While the M240 has its own share of quirks, so far I've found the camera to be a better match to my style of shooting and hardware expectations. I often use it alongside a Canon 1DX. They're certainly two very different cameras, but I find the M240 complements the 1DX nicely. It's ready for the next shot much faster than the M9, and does it more quietly, too. The shutter and re-cocking sound is much more refined than the M9's annoying clunk-buzzzzz. There are other improvements too, such as the much better LCD display and easier to read menu. The huge battery is also very welcome.
Image quality improvements over the M9 are not necessarily clear-cut. Yes, there's slightly greater resolution, more dynamic range and cleaner high ISO performance, particularly in respect to chroma noise (the M9 tends to go splotchy). But I wouldn't pick the M240 over the M9 strictly based on image quality. Rather, it's all the small improvements to how one uses the camera that IMO make it more enjoyable to use, for me.