For this author, and many others, the book is somewhat of a loss-leader of some sort: a form of marketing for a consultant, freelancer, aspiring politician, scientist, activist, or similar. PhD theses often work like this, too.
In that scenario, the royalty cheque is sometimes nice, but not considered necessary. If given a choice between, say, ten people reading the book for free versus one person buying it and never getting around to reading it, these authors will always chose the former.
But there is, quite obviously, a different kind: the professional author. GoT wouldn't have happened within George RR Martin's lifetime if he had to teach English or run a really strange cult on the side to pay rent. Many non-fiction authors fall into the same category. James Gleick might be one people here enjoy.
This isn't necessarily a binary distinction. Noam Chomsky, Richard Feynman, or Edward Tufte could have all lived quite comfortably on just their salary as professors and the occasional Nobel prize. But their success as authors drastically increased their freedom, possibly allowing them to take risks in their work they would have avoided otherwise, like talking truth to NASA (and/or capitalism).
As an analogy, consider the not-uncommon offer to work for free on someone's (commercial) software project in exchange for "exposure". This is more common among designers and musicians these days, but used to happen quite frequently to programmers as well. It's exactly the same logic, and not always entirely wrong. Nonetheless, it has become somewhat of a running joke/faux pas/universally recognised sign of a person having no clue of the industry and to be avoided.