In the account in Matthew, Jesus applies the parable to ‘this wicked generation’ Matthew 12:43-45
‘This generation’ refers to the Jews of Jesus’ day Matthew 11:16; Matthew 12:41; Matthew 16:4; Matthew 23:36
Jesus was aware of the approaching disaster of AD 70 Luke 19:41-44; Luke 21:6; Luke 23:28-31
The Jews brought the calamity upon themselves. Their increasingly evil behaviour left the Romans little choice.
This is testified to by Josephus – see: http://www.josephus.org/causeofDestruct.htm
This is not to suppose that unclean spirits literally exist as supernatural entities and were the cause of Israel’s dispersion. If this were the case the Jews suffered through no fault of their own. Clearly the Jews were punished for their own wickedness, of which ‘unclean spirits’ are used figuratively in this parable to describe an evil way of thinking, leading to worse and worse behaviour.
The principle in the parable is not of course restricted to the Jews. The principle applies to Christians as well. 2 Peter 2:18-22
I hope you have found this helpful.