Juve were on the brink of forcing extra-time in their quarter-final with Real Madrid on Wednesday, leading 3-0 in stoppage time in the second leg after a 3-0 defeat in the reverse fixture.
Referee Michael Oliver then awarded a penalty to Madrid after Medhi Benatia was adjudged to have fouled Lucas Vazquez, and Buffon's protestations – which involved putting his hands on the official – earned him a red card.
Cristiano Ronaldo scored the penalty to secure Madrid's progression with a 4-3 aggregate win, and Buffon blasted Oliver after the game, saying he had a "trash can" instead of a heart and accusing the official of not having the required "personality and sensibility" to officiate such a match.
Buffon has been condemned for his behaviour, but Allegri thinks the veteran goalkeeper should be given the benefit of the doubt and has urged Juve to channel their anger as they turn their focus back to the Serie A title race.
"For 20 years, Buffon has been a role model both on and off the pitch," Allegri told reporters ahead of Sunday's clash with Sampdoria.
"If on one occasion he said the things he did, in a situation as tough as Wednesday night's, that is understandable and I challenge anyone to have reacted differently.
"Tomorrow [Sunday] we need to take to the field with a controlled anger, built up from the match in Madrid.
@OfficialAllegri: "For 20 years, @gianluigibuffon has been a role model both on and off the pitch. If on one occasion he said the things he did, in a situation as tough as Wednesday night's, that is understandable and I challenge anyone to have reacted differently."#JuveSamp— JuventusFC (@juventusfcen) April 14, 2018
"Full credit to my players for their extraordinary performance in Madrid. It was an incredible game and we've all been talking about it for the last three days. Now, however, we need to focus fully on Sampdoria."
With seven matches to play, Juve are four points clear of rivals Napoli at the Serie A summit.