He punishes whom He pleases, and He grants mercy to whom He pleases, ...-- Sura 29:21
Allah leads astray whom he pleases, and he guides whom He pleases, ... -- Sura 14:4
Does Allah "take pleasure" in punishing people and leading them astray?
Answer: The verb "yasha" in Arabic means more he wishes not pleases. Even when God's wrath is sent to people he does not take pleasure in that it is justice and discipline. He never troture people before he sends his clear warning.
29:21 "He punishes whom He pleases, and He grants Mercy to whom He pleases, and towards Him are ye turned. يُعَذِّبُُ مَن يَشَاء وَيَرْحَمُ مَن يَشَاء وَإِلَيْهِ تُقْلَبُونَ