It did and it didn't.
I hear where you are coming from, but after the 5 yard penalty, they had still been penalized 1/4 of the entire field.
The converse of your argument is also true. That is, if not for the penalties against SD (assuming some were bad calls), there is a good chance they are within 20 yards of the endzone with over 1 minute left. Instead they had 1st and 37 on their own 30ish.
Anyhow, the point is, there were bad calls against both teams, theirs just came during an attempted game-winning drive.