When juventus offer a crazy sum of money for them then there is no reason for them to refuse. Afterall donnaruma is still a young player, although he is quite good nowadays it doesnt guarantee that he will be a top goalkeeper in the future so there is no point for ac milan to keep on holding him
Donnarumma was very young and his chance to become the world's top goalkeeper is huge, he has continued to improve performance so that if a consistent appearance he will be the world's top goalkeeper.
Juventus interested in buying Donnarumma because they were preparing a good goalkeeper as a replacement for Buffon when he retired because of his age are old so that Juventus had to find a replacement that is proper.