Here's a very condensed version of Freud.
He has the concept of the id, the ego, and the superego which are not physical parts of the brain. The id is the urges, impulses, and desires. The ego is the more grounded reality, and the superego is the morality and conscience. In dreams, the superego battles the id in an attempt to mask those urges and desires so the result that is expressed is vague and in a form that is not offensive to the superego.
There are things of the human mind that artificial intelligence will never be able to grasp.