Most likely, by using PostScript (edit: sometimes, even high-resolution raster) files that have no semantic markup and cannot be automatically reformatted in any way other than simple zooming/scaling. Such files are not much easier to transform into ebooks than scans are, but are probably harder to get access to.
This state of things is quite apalling. Given how small the source files are, I would've thought that publishers would keep an up-to-date copy of all of their books in a centralized repository.
Some publishers might do this. But it would be very surprising if any major publisher has been completely standardized on using the exact same toolchain and file formats for more than 20 years. Most publishers also have no incentive to modernize the markup for a book that's not getting any content updates.