Gianluigi Buffon was sent off after reacting angrily when referee Michael Oliver awarded Madrid a penalty late in the second leg of the Champions League quarter-final.
Juve were trailing 3-0 and came back to bring the tie level at 3-3, but Cristiano Ronaldo converted the 97th-minute spot-kick to send Madrid into the last four.
Bonucci, who left Juve for AC Milan at the end of last season, said he was thankful he was not present when the penalty – for a foul by Medhi Benatia on Lucas Vazquez – was awarded.
“If I thought, ‘Thank goodness I’m not there’ when he whistled the penalty? Yes,” he told Premium Sport.
“I thought it because maybe I couldn’t keep my instincts under control.”
Bonucci added: “Gigi is the greatest goalkeeper in the history of football.”
Madrid will face Bayern Munich in the Champions League semi-finals, while Liverpool meet Roma.