It can and does happen.
It has happened to me. If you ever purchase a book with my name in it, and suspect some gremlins have run amok through the printing-house, please contact me and I can clear things up.
I now have a clause in my editing contract which states:
5. SPECIAL CLAUSES
Other: Author is responsible for insuring that the FINAL EDITED DOCUMENT is the one sent to the printer or publisher and any discrepancy between said document and the final version the editor authorized is the sole responsibility of the author and in no way a reflection of the quality of the editorial work. (Please initial) ______
That little legal escape hatch helps not at all out in book buying land.
Both the author and editor can survive this seeming fiasco. When we receive emails pointing out our ineptitude we respond with good humor. Nasty reviews don’t go down as easily. Sometimes all you can do is say ‘Oh well’.
Never hesitate to ask an author or editor if some unfortunate slip-up has occurred.
Do not just blindly assume that they are incompetent nincompoops. Any self-published author is only too aware of the cost of printing. Trashing the entire print run (“Off with their heads!”) only sounds like a solution to a lottery winner.