That's true. I have the good fortune to work at a college (Olin College) that recognizes that my work developing textbooks is aligned with the mission of the institution, and can have as much external impact as research. But you are right -- most places give professors zero credit for writing textbooks.