As a student, I never really gave a thought to where textbooks actually came from. The extent of my understanding was
Step 1: Professor says 'I have a Great Idea for a textbook'
Step 2: Then a Miracle Occurs...
Step 3: Profit.
Most people working in the game industry don't think about writing a textbook in their spare time. It never really enters our minds. It's not like textbook publishers come calling to remind us. And it's not like we have any spare time, anyway.
This cannot be said of academia. Textbook company reps actively court professors in a variety of ways, both to peddle their wares and to seek out any future book authors.
Through talking with one reps, I now know how textbooks get made, at least at one large publisher.
Step 1: Professor says 'I have a Great Idea for a textbook'. I didn't expect to get this part right! It's a little more involved, though; the professor submits some materials like a resume and proposed table of contents. The objective here is to show that there's a need for the book, and that you're the one who should write it.
Step 2: Marketing people at the publisher do market research to see if there's enough people who would want to buy the book. If not, begin negotiation to find something that the professor is qualified to write. Meanwhile, an Editor evaluates the resume to see if this is someone who has the basic skills required to write a book.
Step 3: Professor is asked for a sample, maybe one or two chapters. Publisher submits these to colleagues in the field -- other professors teaching relevant classes, for example. This lets the publisher know if the professor has a clue what he's talking about, and also whether the book would be remotely useful in classes. If not, publisher may ask for edits and try again, or may simply hold on to the idea and try again the following year.
Step 4: Publisher receives positive feedback from the sample chapters. Begin negotiations on the actual contract, payment schedule, milestones, etc. The entire process up to this point takes maybe two or three months, minimum.
Step 5: Write the book. That part usually takes one to two years, although it varies (of course). Then it's printed, marketed and shipped.