Nowadays, it's popular because there is already a community of those kinds of people that have built up, so it draws more in. As a nomad living a very transient life, it's nice to arrive somewhere and plug straight into a scene where people have a similar experience and are keen to meet other travelers and share tips.
I've spent about five months in CM, and the reasons to go there are plentiful - cheap lifestyle, great food, less hectic than Bangkok, lots of nature to escape into, and, very importantly, a thriving coffee scene where nobody gets mad at you if you stay in a cafe all day with your laptop (while buying some drinks of course). It also has a coworking space to rent desks by day, month, or year.
As for how it initially turned into such a nomad hub, I imagine it has something to do with all those wifi-connected coffee shops and the fact that it's such a fat, unyet, relaxed place to live.
However, people now point to Ubud as the next Chiang Mai for digital nomads... you heard it here first (maybe..)