There are a lot of assumptions you're making there, no offence meant.
Now, Allah is indeed omniscient. As for benevolence, we say He is the Most Merciful (not All Merciful). This means, more or less, Most Merciful out of all who show Mercy. No man should presume to restrict Him to complete and full ercy, and complete and full forgiveness all the time for everything. Allah has within His attributes the attribute of Most Just as well. How can it be justice to those who did serve Him to put those who did not serve Him at an equal level to them? All of His attributes are in harmony with each other and none of them conflict. Perhaps some take precedence over others, Allah knows best.
Allah created Mankind for the purpose of recognising Him, and then submitting to Him, more or less. That is by taking the Kalimah as one's creed and having at least some conviction in it. To that end and purpose, everything has been designed. All men will submit to Him eventually. Either they will submit in this world and attain Paradise within which to continue to be in reverence of Him while having attained His Pleasure, or to refuse to submit in which case He may prescribe for them Hell. In Hell, its dwellers will also be in submission.
Anas ibn Malik reported: The Prophet, peace and blessings be upon him, said, “It will be said to a man among the people of Hellfire on the Day of Resurrection: If you owned all that is on the earth, would you pay it as ransom for yourself? He will say yes. It will be said: I wanted from you something easier than that, for when you were still in the loins of Adam you were told not to associate anything with Me and yet you insisted upon an associate with Me.”
– Musnad Ahmad 11880 (Source: abuaminaelias.com)
Another version:
“Would you give as ransom the world and everything in it if you owned them in order to be saved from this torture?” He says, "Yes, I would." Thereupon, Allah will say, “When you were among the descendants of Adam, I had asked you something much easier than this sacrifice: not to associate any partners with Me. However, you kept on associating partners with Me.”
– Bukhari, Muslim (Source: questionsonislam.com)
It can be posited from this following Hadith, perhaps, that the existence of people of Hell may also have the function of being one of the factors that help create people of Heaven:
Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Verily, no one will enter Paradise but a soul submissive to Allah, yet Allah may support this religion by the hands of a wicked man.”
– Bukhari 2897, Muslim 111 (Source: abuaminaelias.com)
Note: I am relying on third parties to translate these Ahadith, and cannot vouch for the complete reliability of the translations.
I testify that if this response has any truth to it, then it is by the permission of Allah. Whereas if it has any falsehood to it, it is my shortcoming, and fault, entirely, and alone.