The cost of production, and the very limited number of sales.
Publishers - reputable ones at least - do hugely more work with non-fiction books than they do with fiction. They generally send the content out for review by people knowledgeable in the field - nothing worse for a publisher's reputation than publishing a textbook with factual errors.
The cost of printing is completely trivial compared with the cost of producing a textbook. It's unreasonable to expect them to be sold for $10.