On that hill there was a big herd of pigs eating. The demons begged Jesus to allow them to go into the pigs. So he allowed them to do this.