I was listening to the last teaching again that began with the reading of the gospel of Matthew.
Jesus almost certainly allowed the devils to go into the heard of swine and thereby causing their death because the Jews were not allowed to keep pigs or to eat any pig meat.
Matthew 8:30-32 Authorized (King James) Version (AKJV)
And there was a good way off from them an herd of many swine feeding. So the devils besought him, saying, If thou cast us out, suffer us to go away into the herd of swine. And he said unto them, Go. And when they were come out, they went into the herd of swine: and, behold, the whole herd of swine ran violently down a steep place into the sea, and perished in the waters.
Leviticus 11:7-8 Authorized (King James) Version (AKJV)
And the swine, though he divide the hoof, and be clovenfooted, yet he cheweth not the cud; he is unclean to you. Of their flesh shall ye not eat, and their carcase shall ye not touch; they are unclean to you.
Leviticus 11:26 Authorized (King James) Version (AKJV)
The carcases of every beast which divideth the hoof, and is not clovenfooted, nor cheweth the cud, are unclean unto you: every one that toucheth them shall be unclean.
With him performing miracles and also informing them of their obligations under the Law they would have been really uncomfortable having him in their presence.