Inzaghi scored in his final appearance for the club at the weekend.
"Inzaghi has once again demonstrated his professionalism and above all I think he had a great chance to close his Milan spell, and I don't know, maybe his career, in the best way possible," said Allegri.
"It was a beautiful gift, among other things it was a beautiful goal. Although this year he has had some injuries, he has a quality that is difficult to find in all other strikers in Italy and Europe.
"It is normal that when one is a player that you want to feel important, that you always want to play, and forever. On the other hand, there is a Coach who is always a b*****d, who has to make choices.
"I thanked Inzaghi as I thanked everyone who played their last game for Milan, for what they gave me during these two years and because they helped me in the first year win the Scudetto."