A person with desire and attachment receives those imaginations based upon the impressions of numberless pristine lives. Nothing, that impresses the mind once is ever lost, and the Soul being cognisant of all those impressions makes them appear.
संस्काराणामसंख्यानां कामात्मा तदवाप्नुयात्। मनस्यन्तर्हितं सर्वं स वेदोत्तमपूरुषः॥