If Allah is so merciful why did he create hell? Would you put somebody that you hate the most in hell to burn for eternity?
I just don't see the reason of hell.
"Would you put somebody that you hate the most in hell to burn for ETERNITY?" -- Humans have emotions that may sway them away from justice.. and even cause them to do injustices (as history has shown many times) but God is above that. Alhamdulillah.
[I doubt you'd want your child to be put into jail for life if he/she commits a crime (out of sympathy) but that's the consequence of doing evils in your society; just 'cause "you" wouldn't want them there doesn't mean they should be let off the hook].
"the reason of hell" - It's fairly simple. Punishment. Purification. Final resting abode for those who would continue on disbelieving and committing crimes forever if they could. Their intention is to do evil forever, so they get punished in Hell forever.
If you could but see when they are made to stand before the Fire and will say, "Oh, would that we could be returned [to life on earth] and not deny the signs of our Lord and be among the believers." But what they concealed before has [now] appeared to them. And even if they were returned, they would return to that which they were forbidden; and indeed, they are liars. [Qur'an (6:27-28)].
When criminals complain about jail [where they suffer and are deprived of freedom], do you criticize society for having jails? No, you tell the criminals to stop doing evil. They put themselves there. Likewise, you put yourself in Hell via bad choices.-- Have mercy on your own soul and save yourself from Hell.
I'll address the question of eternal hell.
The most dominant position does seem to be that eternal torture in hell is a just punishment. I don't remember reading of someone who calls hell a mercy to its inhabitants.
Of course, eternal torture clashes with the notion of mercy. More than that though, it also clashes with the notion of justice - if you are not getting out of hell, then its purpose can't be a matter of reforming you to a better character, or you would have to be released once you have a better character - and if you're not moving towards having a better character, then the punishment isn't apt for its purpose, and flawed for that reason; since you are being punished for an offense committed in finite time (and therefore can only have done finite damage) with a punishment lasting infinitely long, it's grossly unbalanced; the only offense landing you in hell forever is disbelief, and the one you are offending against in that case - God - cannot be harmed, so you are even being punished without having enacted any harm on anyone; saying "no that doesn't sound right/convincing to me" about what Islam claims already constitutes disbelief, and will earn you hell forever, yet massacring thousands of people in arbitrarily cruel ways only earns you a long, but finite time in hell. A long list of similar sentiments will come to most people's ethical intuition.
These conflicts are usually answered with (but not solved by) retorts to the effect of "disbelievers would go inflict nothing but evil for eternity anyway, so punishing them forever is just", or "God is infinite, so any offense against him has infinite weight", or "justice is what God calls justice", or a number of other unsatisfying responses. Taken seriously, most of them lead to the conclusion that God could send anyone to hell forever for any reason at all, and the believers would still have to call it justice.
Another conflict in a related context is that between qadr and free will - it is one of the main reasons why analogies between criminals being sanctioned by human judges and God sending disbelievers to hell forever are quite poor; human judges are not omniscient, they do not create the criminal's environment, intuitions, inclinations, and thoughts, and human judges have no means of moving a criminal away from committing a crime before they do it.
To my knowledge, there is no resolution of this clash between ethical intuitions of mercy and justice and a punishment of eternal torture for disbelief. I think I have seen the opinion that eternal hell is a manifestation more of God's wrath than of his justice.
There have been a handful of scholars who outright said that they cannot see any justice or mercy in eternal hell either. My answer here gives a reference for a book on prominent scholars who dealt with the problem of eternal hell; notably, ibn Arabi thought the inhabitants of hell will come to enjoy being there, and Ibn Taymiyyah thought that hell would eventually have to be extinguished. Both those notions are quite heterodox, but considering they are highly influential scholars from different niches of Islam and yet both felt compelled to disagree with the dominant position (which is so dominant that calling it consensus would not be a stretch), they illustrate that the problem of eternal hell is not something that is easily dismissed.
Typically in every religion there is a concept of hell/heaven. The makers/founders of the religion and in this case Muhammad recognized that if there was no such concept then there will be no reason to dogmatically follow the religion, thus weakening it over time.
Hence, they incorporate a fearsome punishment in the religion for the disbelievers which most people find quite hard to overcome. For example, religion typically seeks to answer questions such as what happens after death. In the absence of any alternative answers the practitioner turns to the religion's answer to the question.
In a nutshell religion, and in this case Islam tries to keep it's followers by a system of fear and greed. It incites fear for disbelieving and not following it's tenets in the form of a horrendous afterlife, and rewards the faithful with gifts and promises of eternal pleasure. This system of fear/greed is a recurrent theme with most religions. Often, this is the most important thing keeping the religion together - since there is no empirical evidence.
You however have hit the nail upon it's head - if Allah existed and was merciful he would indeed not create a hell. If he did create a hell then he would be a hateful and vindictive god. There is no need for a hell/heaven system apart from it's necessity in order to keep the religion together out of greed/fear.
Simply put, I would argue that the concept of "mercy" itself cannot exist if the concept of "punishment" was not there, with it, to begin with. If the concept of punishment was not there, then how could you say (or know) that someone's act was "an act of mercy"?
An act of mercy would never even existed since there was never any kind of punishment whatsoever to begin with (or to end with, in the case of Hell), a condition where everyone was always happy, pleased, satisfied, content, joyful, blissful, never having to worry about a thing (even just a little) and without any time limit a.k.a. forever after.. Heck, you wouldn't even need an afterlife (aka Heaven) if you get the idea (I'm not trying to say that I don't need it btw).
It is like asking why did God created darkness if He was so full of light? CMIIW
The teachings of religion can and has changed over time. I am not aware of any muslim community that rejects hell, but that may come, as there are many different interpretations of Islam. One christian church that nowadays teaches that there is no hell is the Church of Sweden, with about 6 million members. They now see the texts about hell in the Bible as warnings not to be taken literally. All societies and all times make their own interpretations.