In Mark 5:9 does Jesus ask for a name or a title? And why did he ask?
Jesus asked for a name, however, the reply from the man was a "Legion". Possibly the chief of these demons caused the man to reply as such, Legion was not the man's actual name, but meaning that there were many demons involved.
Legion: A Roman legion consisted of 6,000 men.
And why did he ask?
For the benefit of his apostles, the demon possed man, and any onlookers, so that they could be aware of what was taking place. Those present (Vs 16) and the herdsmen described to the city people what happened to the demon-possessed man. Since Jesus was not welcomed in the region of Gerasenes and asked to leave, He instructed this man to tell his relatives and others in the region what happened, in order to counteract any adverse rumours that may circulate due to the loss of the swine. Mark states what happened.
Mark 5:14-17 NASB
14 Their herdsmen ran away and reported it in the city and in the
countryside. And the people came to see what it was that had happened.
15 And then they *came to Jesus and *saw the man who had been
demon-possessed sitting down, clothed and in his right mind, the very
man who had previously had the “legion”; and they became frightened.
16 Those who had seen it described to them how it had happened to the
demon-possessed man, and all about the pigs. 17 And they began to beg
Him to leave their region.