Books covering primarily academic topics, from philosophy and neuroscience to physics and geopolitics, are usually written (not surprisingly) by experts in the field, which are normally academics themselves. I wonder how these academics secure the time and funding to write such books?
To give a few arbitrary examples, I refer to books like these (note that these are not college textbooks):
Nihil Unbound: Enlightenment and Extinction - at the time of publication, the author was an associate professor of philosophy;
Phi: A Voyage from the Brain to the Soul - the author is a professor of psychiatry at the University of Wisconsin;
Incomplete Nature: How Mind Emerged from Matter - the author is a professor of biological anthropology;
The Global Minotaur: America, Europe and the Future of the Global Economy - the author is a professor of economics.
Is this something academics normally work on in their spare time, or do they get paid to actually do it? Are there grants or donations involved? Is it a privilege that comes with tenure? I'm mostly familiar with life science research, where people will constantly publish papers in journals and that's it - there seems to be no time nor funding to write anything beyond that, at least not as a part of the job.
Apparently, the amount of books written by academics also varies with discipline - e.g. there are more books by professors of philosophy compared to professors of physics. Is this also due to the differences in funding mechanisms and day-to-day job duties among various disciplines?
What are the main factors that influence this?