From The Gospel of Matthew by Curtis Mitch and Edward Sri, commenting on Matthew 7:24-27:
Jesus draws the Sermon on the Mount to a close with a parable about two builders, one foolish and one wise. The parable stresses that obedience to the words of Jesus must be the foundation of our lives (7:24). All are destined to stand before him on the day of judgment. When that day comes, Jesus will test whether we put his gospel into practice or merely heard his message but failed to heed it.