This is great research and quite frightening.
One clarification, publishers often make money even if the writer does not earn back their advance. The advance is against say a 15% royalty.
let's say a publishers gross margin after all costs, excluding the 15% royalty is 40%. And say the advance is $100,000 and the book has revenues of $500,000.
The publisher still makes $200,000 (40% OF $500,000) in variable margin less the $1000,00 advance for a net of $100,000 but the author's royalties were below the advance.