If the mind is continually in good shape, evil won’t have any place to land or catch hold. But if our goodness isn’t constant, evil will be able to find a perch. It’s like rowing a boat out into the ocean. If we stay close to shore, crows flying from the shore will be able to perch on the mast of the boat. If you don’t want them perching there, you have to row out as far as you can. The crows then won’t be able to perch on the mast. If any crow tries to keep flying out to the boat, it’ll lose sight of the shore and is likely to die out there in the ocean, because it’ll run out of strength, it’ll run out of food. It’ll have to die.
In the same way, if goodness catches hold of the greater part of the mind, evil will have to circle aimlessly around with nowhere to land. If it stays close by — meaning that goodness has only a small part of the heart — evil will be able to come flying in. Sometimes it waits on the opposite shore. If your strength of mind runs low, it’ll stay right nearby and catch hold of you easily.
– Ajahn Lee.