Never having written anything for public consupmtion beyond magazine articles, and having neither the time nor inclination to write a book, I hesitate to offer my twopenneth.
It seem to me that the motivational factors you mention tend towards the altruistic, and ignore the satisfaction the writers get from their activity and the possibility of reward, be it either peer recognition or money.
I concede that most writers of history have 'day jobs', but their are a few for whom history is their exclusive profession.
I do agree with you entirely that the target audience is fundamental, and this applies to the dissemination of anything really. In my profession one often has to write several versions of a single document. For the professional and specialist it will often run to the size of a small book, together with supporting evidence, but for the most senior lay readers the same document will be distilled into a couple of pages.