Well obviously if you score as time expires to go down 2 because you lose the game if you don't.
And extending that logic, like, if there are 30 seconds left and you score to go up 1, that single extra point is for all intents and purposes meaningless so it's worth the low-percentage shot to get that second point that does something important for you.
It was the right decision to go for 2 at the 2 yard line because that 2nd point was meaningful, but once the penalty hits and it's a <10% shot, there's just too much time and too many permutations to throw away nearly a whole point of expected value like that. Wrong decision.