Nobody is defending lashing. It's the Claim that lashes are part of Iranian culture that's being questioned, as it enables scapegoating and dehumanisation of a people based on nationality; a good example is the genocide within Gaza and how it was largely whitewashed by claiming the actions of hamas equal the actions of Palestinians.
It's no different to claiming that the abduction and rape/torture of citizens based on ethnicity is American culture... I'm not American, but i'd assume there's widespread disgust at all the concentration camps ICE have set up and inhumane treatment going on inside them, so wouldn't claim it's part of American culture, but just because I won't brandish every American as a rapist doesn't mean I agree with rape and torture.