The late, great George Orwell spent an entire essay on this. I plan to do it in just one paragraph.
“I don’t write for money. I certainly don’t write for the glory, for that’s the last thing you’ll generally receive. The things I write I view as tiny sentinels sent out like beams from a lighthouse into a raging stormy night in the vain, forlorn hope they may prevent one lonely ship from crashing on the rocks.”