The Morocco international was a substitute in the 1-0 victory at San Siro, which kicked off at 17.00 UK time (18.00 in Italy).
Despite there being only a few minutes left in the match, Amrabat took advantage of a break in play for an injury to rush to the sidelines and quickly eat a banana.
It raised a few eyebrows during such a crucial moment of the game, but it is easily explained, because Amrabat is Muslim and was fasting for Ramadan.
He is therefore not allowed to eat or drink anything until the sun has gone down, which in this case was during the final minutes of the match.
Having eaten nothing all day, the midfielder was eager to keep his energy up and broke his fast by quickly wolfing down a banana after sunset.
Ramadan continues until the night of April 21.