Why don't many textbooks have electronic versions? I'm trying to find a way to buy Doug West's Introduction to Graph Theory but with an electronic edition. I can't find one. What's the barrier for these books being electronic?
tl;dr-  Many books aren't available in ebook form for money and pretentiousness.

Money can be impacted because it's really easy to pirate ebooks.

Pretentiousness is relevant because there seems to be a stereotype about printed books being more prestigious.


Worth noting that I'm obviously against this practice, as I see it to be contrary to the mission of spreading knowledge and making academia more broadly accessible.  I would encourage instructors to select texts with electronic formats available whenever possible.
1.  Ebook availability makes pirating easier
It's pretty easy to pirate an ebook.  A quick automated script can take screenshots that're easily enough pasted into a word processor and saved as a PDF.  Common ebook apps attempt to have defenses against this practice, though they tend to be fairly easily defeated (which I won't elaborate on for obvious reasons).
The same can be done with hardcopy books, e.g. as demonstrated by Google Books, though it's a lot harder and typically produces lower-quality results.
2.  Many feel that hardcopy books are more prestegious
I have to stress that I truly despise this point.  However, the one book that I've written isn't available in ebook form as I wrote it as the request of a PhD advisor who insisted that it not be available in electronic format.  I protested this on multiple occasions, so while I strongly disagree with their logic, here I'll explain it.
First, we wrote the book primarily due to the publish-or-perish regime that rules much of academia.  My advisor felt that, by writing the authoritative book on a topic, it would establish recognizable authority across the field.  Students would know our names because they had to buy the book, and academics in the field would need a hardcopy of it on their book shelves.  And, of course, publishing books looked good on their faculty activity report, an annual report to their supervisor (typically a department head, or the school's president for senior professors).
My advisor had also expressed the opinion that readers respect a book more if they can feel it in their hands, especially as a hard-cover book.  The formality and expense impressed upon the reader the stature of the topic and the writers.  We've recently seen an example of how some students can feel that electronic materials are less respectable in this post.
And while my advisor didn't say this, I think that it's important to note that, until recently, ebooks and the internet weren't a thing.  Many older folks completed their education using only hardcopies, and due to that background, they have a strong emotional association between hardcopies and legitimacy, while electronic copies can feel cheap by contrast.