When I'm translating plain text (Markdown-ish) input to LaTeX, I spend a bit of time going through by hand making sure all my formatting has converted correctly, any accents or non-roman characters are correct, the single- and double-quotes are correct, I haven't accidentally copy-pasted any ligatures, I have included hyphenation for nonstandard words, I've included any relevant non-breaking spaces, figures and headings and captions are flowing correctly, etc. etc. And all of these are still necessary when producing an ebook.
It's maddeningly detail-oriented, but the results are really noticeably much better, and in many cases make the difference between the text being readable and not. It's a bit like the cue dots at the movie theater---if you're not looking for them, you don't notice your uninterrupted experience unless the projectionist screws something up.
Given that ebooks are electronic, perhaps they could use some sort of pop out window for larger code snippets, so that they could be scrolled rather than in page format.
(Some of my other favorite conversion errors: Endnotes or references not hyperlinked. Chapters and other headings not correctly marked-up. Page numbers or other irrelevant header/footer material not stripped. Footnotes, margin notes, or other relevant header/footer material stripped. ...As you can tell, I'm great fun at cocktail parties.)
In addition, if you really want to put out a quality product you have to be aware of how each e-reader renders the stuff you send them. Different e-readers process the same file differently and not all support the promised features of epub 3.0. It's best to know up front what each supports in terms of images and scaling, and then write with that in mind. Again, far beyond latex.
I must confess to being baffled by all this talk of typesetting, for the following reasons:
1) My ebook readers (Calibre and iBooks, mostly) algorithmically render and reflow the text to arbitrary typefaces, sizes, columnar layouts, etc. Isn't this "typesetting?" And isn't it taking place entirely in software? [0]
2) Latex consumes a plain-text (aka neither designed nor typeset) file as input and produces tolerably-good machine typeset output. Its output is vastly better than plenty of well-regarded periodicals such as [1], which proves by construction that good-enough machine typesetting can be implemented.
[0] I'm not claiming iBooks typesetting is remotely comparable to what's found in a Random House hardcover, but rather that no hand typesetting at all takes place for most (all?) ebooks.
[1] http://www.cabinetmagazine.org/