No world, no bestowing goodness of evil. Why this urge to create world and bestow goodness and accompanying badness? Who bestowed badness? A better answer is needed.
There is a lot to unpack here, but to summarize:
There is a concept of “bread of shame”. Were God to simply bestow goodness upon us without us doing anything to earn it, that would not be the ultimate good.
Take the following parable as an illustration:
A guest arrives at his host, and is warmly welcomed. He is served day and night and his every need is catered to. When he offers to do something himself or to help out in return for the hospitality, the host refuses and doesn’t allow him to lift a finger. A guest treated in such a manner would want to pack up and leave as soon as he can make his exit.
To enable us to receive goodness that does not involve this “bread of shame”, God gave us the ability to earn the goodness.
The ultimate goodness is spiritual in nature and because we need to earn it, our paths will be strewn with lessons our souls need to learn. Sometimes those lessons are painful.
There are many additional perspectives from a Jewish standpoint to understand human suffering, but ultimately all those perspectives fit into a spiritual/ soul context.