The crowds continued following Jesus after he finished his sermon because he was returning to the place where his ministry had begun (Matthew 4:23) and had already been surrounded by the crowds then (Matthew 4:25). Most in those initial crowds had also heard the sermon (see Matthew 7:28) and now continue to follow him (Matthew 8:1) for some time (Matthew 9:36–38), having heard so much about the path to the kingdom (Matthew 7:29), and wanting to hear and see more (Matthew 9:35).
When Jesus completes His teaching in Matthew 5:1–48, he does not simply leave the mountain. Rather, he descends again to the lower coastal region. As such he return to the place where his ministry had originally begun (Matthew 4:23). Just as the crowds had surrounded Jesus then (Matthew 4:25), so they still surround him now. Most of them had heard him on the mount (see Matthew 7:28), and were astonished at the authority with which he taught concerning the path to the kingdom of heaven (Matthew 7:29).1
Matthew also tells us that during this period of his life Jesus was quite often surrounded by a great crowd who followed him to hear his teachings and see his miracles. As Matthew 9:36–38 reveals, this also continued to be the case for quite some time.2
1 Lorsque Jésus fut descendu de la montagne, une grande foule le suivit.