Allah loves man 70 times more than his mother. Also our every action can not happen without consent of Allah then why does man commits the sins and punished by Allah. ( Keeping this fact in mind that saitan( iblees) is also controlled by Allah).
The most on point passage that I can refer you to on the question of why Allah punishes us is surah 33, ayah 72-73. It says:
“We did indeed offer the Trust to the Heavens, and the Earth, and the mountains, but they refused to undertake it because they were afraid of it. But man undertook it. He was indeed unjust and foolish, (with the result) THAT ALLAH HAS TO PUNISH THE HYPOCRITES, MEN AND WOMEN, AND THE UNBELIEVERS, MEN AND WOMEN. And Allah turns in mercy to the Believers, men and women, for Allah is Oft-forgiving, Most Merciful.”
What was the Trust that man accepted and, in so doing, obliged Allah to punish hypocrites and unbelievers? It was
a pure soul, undirtied by sin,
limited free will, and
the responsibility to use our freewill to keep our souls free from the stain of sins by obeying the commands and prohibitions of Allah, and worshipping Him faithfully.
Thus does the Qur‘an tell us, “By the soul, and the proportion and order given to it; and its enlightenment as to its wrongs and its right. WITHOUT DOUBT, HE SHALL BE SUCCESSFUL WHO PURIFIES IT, AND, WITHOUT DOUBT, HE SHALL FAIL WHO CORRUPTS IT.” Qur‘an 91:7-10
Also in 8:37 Allah says, “...In order that Allah may seperate the impure from the pure, put the impure on top of one another in a heap, and throw them all into Hell. They will be the losers.”
The impure are the hypocrites and unbelievers. The pure are the believers who will be made pure, not 100% due to their merit, but by the mercy and forgiveness they will receive from Allah.
This is simply the way it is. The life we are living here in the dunya is not our real life; it is but a short period of time that we have been allotted to demonstrate our faithfulness, loyalty, dedication, and devotion to Allah. If we reject Him outright (as the unbelievers do) or squander our opportunity to win His favor and mercy (as the hypocrites do), then I‘d say we have EARNED His punishment.
But it kind of seems like you‘re wrestling with the fact that Allah can be as merciful as He tells us He is and, yet, be wrathful. Consider this...
“When those who believe in Our signs come to you say to them, ‘Peace be upon you! Your Lord has ordained for Himself mercy. If any of you did evil in ignorance, and thereafter repented, and them made amends - lo! He is Oft-forgiving, Most Merciful.‘ Thus do We explain the Signs in detail, that the way of sinners may be shown up.” Qur‘an 6:54-55
Also I once read a hadith Qudsee (and want to say that it was in An-Nawawi‘s 40 Hadith Qudsee, but I‘m not 100% sure) that said that when Allah “ordained for Himself mercy” as stated in the above ayah, what happened is that He caused to be written in the Umm-il-Kitab (Mother Book): “MY MERCY SHALL BE GREATER THAN MY WRATH”.
Notice that He didn‘t say, “I shall have only mercy and NO wrath”. No, our Lord has the capacity for wrath, and from that wrath comes His punishment.
“Tell My servants that I am indeed Oft-forgiving, Most Merciful; and that My punishment will indeed be a most grievious punishment.” Qur‘an 15:49-50
It might help you to understand the basis of Allah‘s wrath and punishment. It is based on two things:
(1) The obligation of His Promise; and
(2) The meting out of His Justice.
Allah is Al-Haqq (The Absolute Truth). He does not lie, nor does He break promises. When He tells us something He means it. Now, He has told us clearly that He is going to punish hypocrites and unbelievers. Anyone who does not want to find themselves under Allah‘s wrath and punishment should not be a hypocrite or an unbeliever. That‘s simple mathematics.
Now, with regards to justice, this goes to HOW SEVERELY someone will be punished. “Justice” means giving someone what they deserve. Allah is going to give each sinner only the punishments that their behavior merits.
There seven levels of Hell. The deeper one goes into it the worse the agonies that must be endured. The hypocrites and unbelievers are not all equally evil. Some of them are worse than others. Allah is going to assign each sinner to a level of Hell that is appropriate for their level of evil and sinfulness.That is Allah‘s Justice.
Every human being has a choice to make - we can choose to pursue Allah‘s Mercy, or we can choose to face His Justice.
I hope this answer helps you. Ma‘as‘salaama