In the notes in the New American Bible, Gerasene (also called Gadarenes) is a pagan territory across the sea (of Galilee, according to Luke); this explains the presence of pigs. As well, that Gerasene is a pagan territory near Jewish cities, indicates that the person (or persons, if we'll take Matthew's account) saved was a Gentile.
What is your name?: the question reflects the popular belief that knowledge of the spirit's name brought control over the spirit. Legion: the demon replies a Latin word translated into Greek. The Roman Legion at this period consisted of up to six thousand foot soldiers; so the name implies a very large number of entities; that the herd of swine reached about two thousand does not mean that there were in fact the same number of demons possessing the man.
Of course, this narrative, like many other biblical narratives, may be more theological than historical; it is evident that even the synoptic gospels do not entirely agree on the facts in this passage.
Perhaps the message behind the travelogue (in which this narrative is included) is that the authority of Jesus as the Son of God is more powerful than:
New American Bible, The New Catholic Version