This is the face Kevin Garnett made when he was called for a foul with 10 seconds left. A foul is a foul, right?
Referees are not asked to consider what time of the game it is, and call the violation accordingly. Of course, it happens all of the time: a foul in the first quarter is often not called in the fourth quarter, for fear of influencing the outcome of a close game. It is ridiculous, sure, but it is also human nature to want to let the players paid millions of dollar determine the result, as opposed to the referees paid considerably less than that.