Iran is a republic and has universal suffrage whereby its President is elected by its own citizens. You may not approve this sort of public execution of a criminal, but you have to respect their traditions. Not all their tradition is acceptable from the point of view of the West, but nonetheless its their tradition. There is no point pointing your finger to the things you do not fully understand.