Hamilton was penalised for making more than one change of direction as he tried to defend his position from Alonso. The Spaniard, meanwhile, received the same (20 second) penalty for causing a collision with the British driver during the fight.So basically Hamilton was weaving, while Alonso was penalized for driving into Hamilton -- because Hamilton was weaving.
Either Hamilton defended his line appropriately and Alonso was too aggressive, or Hamilton was defending his position too aggressively and Alonso is blameless.
Can't have it both ways.
---
Update: so OK now that I can actually find details of the penalties -- it looks like Hamilton and Alonso are being penalized for different incidents. Hamilton's transgression happened about two minutes before Alonso's:
The incident which caused Hamilton’s penalty was timed at 17.20 and the incident which caused Alonso’s penalty was timed at 17.22. Given the lap times involved one can say with some certainty that Hamilton’s penalty related to a move on lap 45, while Alonso’s penalty was linked to the collision on lap 46 that led him to pit at the end of the lap.So the officials can have it both ways. Would have been nice if the text of the decisions had been actually available in a timely manner.