People believe in God for two reasons.
1. Self protection
-----Desire for someone or something(God) to protect or save us from trouble.
-----Desire for someone or something(God) to grant us happiness.
2. Self Preservation
----Desire for eternal life and happiness. (After death- they believe that there is an eternal heaven or an eternal hell.)
Nevertheless, In Buddhism
1. Self protection –
-------Protect ourselves through avoiding evil.
------Attain our own happiness by doing good.
2. Self preservation –
See the truth of existence through purifying our minds.
Avoid evil, do good, purify mind.