Milan were definitely keen to sell him, but then they are owned by American moneyballers now, so while selling a local fan favourite could be sus, it could also just be they thought it was a good price and moneyballers gonna moneyball.
https://www.goal.com/en-gb/lists/ac-milan-europe-masters-moneyball-destined-to-fail/blt984a0d51702e6c9d#csf15a588fc393a646