The intellect joined to God for long periods through prayer and love becomes wise, good, powerful, compassionate, merciful and long-suffering; in short, it includes within itself almost all the divine qualities. But when the intellect withdraws from God and attaches itself to material things, either it becomes self-indulgent like some domestic animal, or like a wild beast it fights with men for the sake of these things….
There are said to be five reasons why God allows us to be assailed by demons. The first is so that, by attacking and counterattacking, we should learn to discriminate between virtue and vice. The second is so that, having acquired virtue through conflict and toil, we should keep it secure and immutable. The third is so that, when making progress in virtue, we should not become haughty but learn humility. The fourth is so that, having gained some experience of evil, we should ‘hate it with perfect hatred’ (Psalm 139:22). The fifth and most important is so that, having achieved dispassion, we should forget neither our own weakness nor the power of Him who has helped us.
~St Maximos the Confessor