Your question is based on wrong assumption that Brahma created this world for our enjoyment, and there is nothing else than this world.
About creation
Bhagavata Purana, on the other hand, says that Brahma is being born in the specific universe and starts creating things after being instructed by Vishnu what exactly to create.
Bhagavata-purana 2.5.11 says:
yena sva-rociṣā viśvaṁ
rocitaṁ rocayāmy aham
yathārko ’gnir yathā somo
yatharkṣa-graha-tārakāḥ
I create after the Lord’s creation by His personal effulgence [known as the brahmajyoti], just as when the sun manifests its fire, the moon, the firmament, the influential planets and the twinkling stars also manifest their brightness.
You can read in the whole chapter 3.6 of Bhagavata Purana about what "Lord's creation" Brahma speaks here. After that, there's whole chapter 3.8 about birth of Brahma and after that you may as well continue reading onwards. ;)
Bhagavata-purana 3.9.43 says
sarva-veda-mayenedam
ātmanātmātma-yoninā
prajāḥ sṛja yathā-pūrvaṁ
yāś ca mayy anuśerate
By following My instructions you can now generate the living entities as before, by dint of your complete Vedic wisdom and the body you have directly received from Me, the supreme cause of everything.
So, Brahma doesn't do anything out of his own wishes - he's just a tool in hands of Ishvara.
Chapter 15 of Bhagavad-gita clearly states that there's something else than this (material) world. Krishna speaks rather succintly, because, after all, he and Arjuna are in the middle of the battlefield between two armies ready to fight, but he mentions immaterial world anyway, because it's extremely important.
Said that, let's talk about justice.
About justice
Your question is "why would any God create anything bad anyways". But shastra says that God is above everything related to this material creation.
More than that, Krishna himself says that no one that ourselves are the reason of sufferings:
Bhagavad-gita 13.21
kārya-kāraṇa-kartṛtve
hetuḥ prakṛtir ucyate
puruṣaḥ sukha-duḥkhānāṁ
bhoktṛtve hetur ucyate
Nature is said to be the cause of all material causes and effects, whereas the living entity is the cause of the various sufferings and enjoyments in this world.
Especially important is the verse 15.8:
śarīraṁ yad avāpnoti
yac cāpy utkrāmatīśvaraḥ
gṛhītvaitāni saṁyāti
vāyur gandhān ivāśayāt
The living entity in the material world carries his different conceptions of life from one body to another, as the air carries aromas. Thus he takes one kind of body and again quits it to take another.
All this is to satisfy various desires. We have various desires, and some of us find satisfaction in illicit deeds, one of which is Irreligion. But for it to happen, Irreligion should exist, right? Somebody has to create the concept of it first.
But God wants from us different things:
Bhagavad-gita 18.66
sarva-dharmān parityajya
mām ekaṁ śaraṇaṁ vraja
ahaṁ tvāṁ sarva-pāpebhyo
mokṣayiṣyāmi mā śucaḥ
Abandon all varieties of religion and just surrender unto Me. I shall deliver you from all sinful reactions. Do not fear.
This world is not for our satisfaction. It's to teach us that without God we will not be able to get any satisfaction at all. Some can be taught by simple thinking about God. Some - by hearing about God. But some can be taught only by experiencing continuous suffering, which will lead this living entity to the most important milestone in life - disappointment and finally, regret.
So, according to shastra, that's the most reasonable reason Brahma created such "bad" thing as Irreligion. He had to create everything, so living being could experience everything and draw a right conclusion.
ADDITION: About suffering
It probably is worth noting also about the true nature of "bad". Even if the question started with Irreligion, it ended with more general notion of "bad". I'll show some more shlokas with the assumption that "bad" is something which will ultimately bring us suffering in one form or another.
First of all, Bhagavad-gita 2.12 clearly states that we are not created, we simply exist since time immemorial, and Brahma is involved in our appearance here only by giving us the material bodies we are using and changing here.
na tv evāhaṁ jātu nāsaṁ
na tvaṁ neme janādhipāḥ
na caiva na bhaviṣyāmaḥ
sarve vayam ataḥ param
Never was there a time when I did not exist, nor you, nor all these kings; nor in the future shall any of us cease to be.
This part of chapter 2 explains clearly that we as living beings cannot really be born, get old, get sick or die. All this is material illusion.
Nobody "created us in this world". We are here on our own accord. We do not do here anything ourselves: everything here is prepared for us by almighty Ishvara so we would be able to satisfy ourselves, and while doing so we hurt each other due to our lust being transformed to greed and then to rage.