Man is a very small speck in the whole universe.
For this reason he gets frightened because he does not understand it all (life, the universe and everything).
He cannot believe that all this happened by accident. So he invents this character called "god" so he can package it all up nicely and stop worrying.
Of course, some nasty people see the opportunity to market this "god" in numerous ways, and insist that THEIR religion is better than someone else's, and that being the case we had better go and kill the people in the other religion.
So they use fear, torture, religious hatred and terror to ensure that their religion becomes the most powerful.
And all this in the name of some character man has invented - god.