Dreams attempt to resolve mental conflict
A dream is not primarily the disguised fulfilment of a wish but an attempt to resolve a conflict that was active in the dreamer's waking life, usually one stirred up by the preceding day's experience. Wish-fulfilment appears only when the dream reaches a satisfying resolution, so it is one possible outcome of the dream process rather than its driving mechanism.