All of it is as the penalty for mistakes they did, not the tyranny of Allah SWT. God never tortured anyone, but when he was working on a disgraceful act, because punish a person without any mistakes is not a valid Sunna God. Instead they are mentioned in the verses and tortured because of their sin and infidelity to God, also because they worship idols and they deny the favors given to him.
Dhammaan waxaa ka mid ah waa sida rigoore khalad ay sameeyeen, ma aha kibir Eebe SWT. Ilaah marnaba jirdilay qof, laakiin markii uu ka shaqeeyo fal wax dulleeya, sababtoo ah ciqaabo qof aan khalad kasta ma aha sax ah Sunna Ilaah. Halkii ay ku xusan aayaadkiisa iyo jirdil sababta oo ah dembiga, gaalnimo, in Ilaah, sidoo kale sababta oo ah waxay Caabudi Sanamyo iyo inay ka gaaloobeen xaqa Eebe teebaad u siiyey isaga inay.