This is how the publishing industry works. Authors get a guaranteed up-front advance and then also a backend residual dependent on performance. In fact this is how many industries work; as an engineer I get an up-front guaranteed salary, but then I also get bonuses and stock refreshers in arrears as reward for good performance.
As for why the industry works like this, this is the income that professional writers live off of. Most of them aren't coming out with even one book a year, and they need some form of guaranteed income to live off of. The publishing company is fulfilling a role here not too dissimilar from VCs, potentially losing money on most bets that don't win big but then hitting the jackpot on something like this novel. It's risk aggregation; what works for a profile of many bets is not good when you're the author with one bet.