As I said in another thread... this deal is a disguised loan from Udinese, and an opportunity to develop a player and to get some cash/asset influx.
In no way will Udinese sign the most expensive player of their history, only to let Juve decide in 2 years if they will basically pay the same money (+ inflation) to get the player back.
This is an obbligation to buy from Juve. Regardless of what happens to Mandragora, those 24M are going Udinese's way in 2 years, and then Marotta will have to find another solution for the books.
It's not a bad deal at all. But these little artificial manipulation moves for the books by Marotta are a dangerous game, shouldn't do it too much. He will have to tap the hole in 2 yrs.