The primary psychological function of a personal god
is to give the believer a surrogate parent.
Some minds are able to become independent of parental figures.
Some others cannot, and without such parental (or authoritative figures)
such mentally dependent people would fall into self-destructive behavior;
minds in this category may need to rely on religion.