Let's see if I understand this. I am neck in neck with the leader in a marathon. His shoe becomes untied. I have to stop and wait for him?
Sports with long traditions have unwritten rules. One of those rules in cycling is that it should be to the greatest extent possible about the rider and not about the bike. Punctures and mechanical failures can happen randomly at any time, and good sportsmanship says you don't try to take advantage of an opponent's mechanical difficulties on long road and mountain stages; especially tire punctures. And you certainly don't choose the occasion of an opponent's difficulties as a time to attack.
That being said, it's debatable whether throwing a chain is a mechanical problem, or a failure to shift properly, which is part of the sport. But since the world of cycling fans had decided that Contador is a jerk before this incident, it's a mechanical problem and he is a coward.