As a banker, I see the "Advance" not as a loan, but as an Option Fee paid for the author's future output. The publisher tried to exercise that option to force a pivot: "Inject AI into this classic book." They tried to turn a "Shinise" (classic craftsmanship) product into a "Trend" product. The author refused to dilute the quality, so the deal fell through.
Keeping the advance is financially justified. The "R&D" failed not because of the engineer's laziness, but because the stakeholders demanded a feature (AI) that broke the product's architecture. In finance, if the VC forces a bad pivot and the startup fails, the founder doesn't pay back the seed money.