That's one explanation, but another is that they build something useful to themselves, grow an audience of users who demand features and bugfixes which are required due to the complexity of the new features, and eventually the burden becomes too much to bear.
And yet... we wouldn't have the wonderful ecosystems of GNU, BSDs, etc. if not for people who love their unpaid work and feel they owe the world something, even if they really, truly don't.
At least for me, this is not true. I owe the world nothing, and I give away most of my code.
Motivations can more complex than debt relationships and greed.
We have an ODATA client package for node that’s publicly available and has seen an increasing number of downloads for whatever reason. It surely must be people who are crazy since we make breaking changes all the time with absolutely no regard for anyone who might use it. Which is sort of my point, we don’t even have a place where people can complain or even contact us, it’s only on the public NPM because it’s free. Once we eventually move away from ODATA it’ll be completely abandoned. Now my point here isn’t so much that you should do this, but it’s that you can. Unless you’re actually working to get adoption you don’t have to give any care to your “community”.
More than once people have threatened to: sue me, dox me, put a bomb in my mailbox, assault me, kill me, kill my family, sexually assault me, sexually assault my family, plant a bomb under my car, get me fired from work, and spread lies about me on the Internet.
I'm aware that they're a minority of the users of free software. I get that they're probably mentally ill or going through it. I get that maybe they're just a few terrible people, but they by far were the most common messages in my email box from users - users who liked the software or even found it useful weren't enthusiastic enough about letting me know about that. For every 20 threats I got I'd get maybe one message thanking me for the software.
You know what nobody ever did? Offer to pay me a couple of dollars for either consulting support or to implement a feature they needed, but they were more than happy to threaten me with legal action if there was a bug that I had no way to test for.