I have spent many years contemplating this issue and at first, I realised the easy solution that atheists use which is to say that God is equally responsible for evil as good and therefore isn't a good guy/chick/thing.
The fundamental cause of good is that evil must be stopped. Think hard about this. In a situation where everyone is neutral, you can't be a good person because the others will repay you back anyway, negating how good you are. If everyone gives as good as they get and acts reasonable, noone and nothing needs to be good at all. What this then means is that the only genuinely active agents, morally, are the evil ones.
In a scenario where everyone is neutral and one evil person shows up, it then means that there is a victim or two and the others staying neutral hurts that person and causes that person to need to be evil in order to even things out again and have equal wealth and health to the others. Thus, the opportunity to be good to that victim and/or be evil to the evildoer only arises due to the initial active evil agent. You can only have good be viable due to the evil breaking away from the default of neutrality.
God must have first created us selfish and brutal, not the other way around, and what happened was that he/she/it discovered the true beauty lies in having good people to prevent the evil.