Righteousness causes our confidence to “wax strong in the presence of God” (D&C 121:45), while the wicked pray that they might “become extinct both soul and body” rather than stand in that presence to be judged of their deeds (Alma 36:15). The unclean spirit naturally shrinks from the presence of that which is clean.
“Do ye suppose that ye shall dwell with [God] under a consciousness of your guilt?” Moroni asked. “Do ye suppose that ye could be happy to dwell with that holy Being, when your souls are racked with a consciousness of guilt that ye have ever abused his laws? Behold, I say unto you that ye would be more miserable to dwell with a holy and just God, under a consciousness of your filthiness before him, than ye would to dwell with the damned souls in hell.” (Mormon 9:3-4.)