Mental illnesses ranging from so-called autism, mood disorders, and personality disorders are really emergent phenomena from dysfunctional human experiences
In the human microcosm of our consciousness, culture, experience, and disposition create an dynamic internal map of morals that it wants to associate with. The ego, driven by the limbic system of emotions then attempts to discern which actions and beliefs will best align itself with those values.
If you are at all interested in cosmology and the fundamental nature of the universe, this 37 minute video might be a useful point of departure for your own investigations.