It just happened that Danilo turned out to be a big shitong
But you know that's the Real Madrid way, the logical thing would have been to sell Benz and keep the younger, more full of potential Morata but its all about the $$$. This kid grew up in the Madrid system, very Raul-esque but it seems Perez couldn't wait to buy him back from Juve just to prove that he could run the club like a business and say he made a profit. They didn't need the money from selling Morata to fund Mbappe but they decided to cash in now.
Plus Benz is pretty much immune to anything.