While this is all true and should be considered- the fact is that if you plan to write for a living sometimes you have to make "popular" things. (I will mention this story technically covers both sides of the argument)
The biggest proof of this was Sir Arthur Conan Doyle himself.
"Whhhaat? But he had a great fanbase with Holmes!"
And that is true. But he wrote stories about Holmes to the newspapers to pay the bills. It's why his short stories are next to impossible to figure out what goes in what order. He played fast and loose with the cannon because he really did not care about that. It was to pay the bills only.
But then why was his writing at all?
So he could get enough attention to publish his true labor of love.... historical fiction.
Once he was ready to go fully into that he looked at Holmes, which was getting far more attention than he wanted, and killed him off. He felt it was a fitting end for a story that he didn't care about and really half the time he just used to show off how smart he was. He got someone to publish his historical fiction, everyone assuming the Homes fans would flock to that next.
They did not.
Now this next part I would like to say, shows the dangers of listening to fans too much.
They cried and screamed- they wanted MORE Holmes!
So... he did as they asked hoping if he did they'd pay attention to his other works and also... he was running out of money.
He wrote some stories that took place BEFORE the incident at the water fall. Even a complete novel. His heart was not in it at all, but he did it anyway.
The fans demanded more and more and finally... he caved. He had Holmes appear to Winston after having died and coming up with a crazy story about how he survived. The fans bought it and read it.
They were angry "The old stuff was better!"
And thus... the first nerd fan rage was recorded.
What I feel this bit of history shows is that sometimes, writers need to make money for other projects and sometimes the audience won't care for your other projects. It can be better if you do what you love first- but if writing is a career then well... you might HAVE to do stuff you don't like to get to the projects you love. But then be braced for the fact your audience who loves you may never love what you do.