The following bit about the basic theodicy of modernity sounds true:
This implicit theodicy of all social order, of course, antecedes any legitimations, religious or otherwise. It serves, however, as the indispensable substratum on which later legitimating edifices can be constructed. It also expresses a very basic psychological constellation, without which it is hard to imagine later legitimations to be successful. Theodicy proper, then, as the religious legitimation of anomic phenomena, is rooted in certain crucial characteristics of human sociation as such.
Peter Burger, The Sacred Canopy (1967)