It was the Sabbath and Jesus had just driven out an evil spirit and the people were amazed. Rumor had it that he also had healed Simon’s mother-in-law of a dangerously high fever and she was instantly cured. Being the Sabbath though they had to wait. Couldn’t walk. Couldn’t work. It was the Sabbath you know.
“When the sun was setting” is when the crowds came. They waited until the last possible second, and probably pushed it a little, to not break the Sabbath in front of this holy man but to beat the door down to Jesus. And come they did, bringing the sick with any and every form of malady. So late into the evening, Jesus laid his hands on each one and healed them, and as was often the case, delivered them from demons.
At some point the crowd was shooed away so Jesus could get some sleep. But they were ready in the morning. Only Jesus wasn’t there. They went all over looking for him and finally found him. They knew he planned on leaving Capernaum. They did everything they could to beg him to stay. This wasn’t just Middle-Eastern hospitality, this was a village of formerly sick people that were now healed, and almost assuredly there were more sick people. And more miracle seekers. Moved by compassion, Jesus could’ve stayed. He could’ve continued to have a very fruitful ministry in Capernaum as he was well-received. Much different than his recent visit to his home town Nazareth where they tried to kill him.
But Jesus knew his purpose–to preach the good news of the kingdom of God to the other towns also. And so he stated his purpose, and did not let the power of “being needed” or a warm reception dictate his mission.