Why would a god create?

I have a question for the theistic world. Why would a god create anything in the first place? It is such a simple question, yet I don’t think it is one that gets enough attention.

For simplicities sake, I’m going to assume for the moment the common belief of most theists, that a god is a perfect being. If a god is perfect, then it does not need anything to better itself (just like you cannot add anything to infinity to get a larger number). So why would a perfect being create anything at all? The question gets even deeper when you notice the universe is anything but perfect. This imperfection of the universe begs the question of why a perfect creator would intentionally create imperfection. Wouldn’t this in itself be a flaw and violate the supposed perfectness of said god?

What would a god stand to gain by creating anything? It obviously wasn’t out of boredom as perfection cannot know boredom. Loneliness is right out as well. A perfect god wouldn’t need things to worship it unless it had some sort of inferiority complex or was incredibly childish (but if you buy into many holy books, you would be hard pressed not to come to these conclusions). It almost seems that by creating an imperfect universe, god would have to also be imperfect. But if god is so imperfect, what would separate this imperfect god from simply a highly advanced intelligence?

Some would argue that the universe would have to be imperfect for us to understand it.This question misses the point of my statement entirely. My question, in asking why an imperfect universe was created also asks why we were created (as we are a part of the universe, not separate from it). Why would a god even bother creating something so violent as humans? I’ve already gone over the worshiping part and why that really isn’t a viable answer.

So why create us? Some may say because god wanted to bestow the gift of life on something in its own image (essentially, an urge to procreate). But such an urge itself requires imperfection. Not to mention the shoddy job. If a perfect god was able to want to create a being, wouldn’t its inherent perfection require it to create perfection. If this were true, then we would have been created as perfect and not be limited to understanding an imperfect universe. Obviously perfection is not limited, but by creating imperfection the perfect being is limiting itself drastically.

This is a question I’ve never had satisfactorily answered (or really answered at all). It is also a question that I believe needs to be asked more frequently. It seems to be one of the larger holes in a theistic belief that holds a perfect being.