Zidane was sold for one main reason... HE WANTED TO LEAVE.
After Zidane was sold to Real, Moggi stated on a press release that when Real presented the offer (~70 million euro) he refused it. Zidane then went and told Moggi that he wish to leave Juventus for Real. So Moggi accepted the offer...