Because the majority of the percentage of the price goes to the publisher, not the author. Since the publisher is incurring less cost for producing an electronic copy, they should charge less.
The paper is cheap. With print-on-demand, there is no worry about printing too many copies, or storing them.
Paying the editor, someone to typeset the book, someone to redraw the diagrams, technical reviewers, and so on gets expensive, though. I think authors should get more money (as an author), but the publishers do theoretically add value.
(Without the publisher, your book is just the man page or a blog post. And despite the time required for the author to prepare those materials, people are entirely unwilling to pay for them.)