"Whoever hears my sayings and puts them into practice, I compare to a wise man who built his house upon rock. When the rain fell and the floods came, and the winds blew and battered the house, it stood firm because its foundation was on rock.BrRon Version of the Gospel According to Saint Matthew 7:24-28.But every person who hears my sayings but doesn't follow them, I compare to a foolish man who built his house upon the sand. When the rain fell and the floods came, and the winds blew and battered the house, it fell with a great crash."
Jesus claimed that obeying his teaching seet a solid basis for being able to weather the storms of life. Those who looked only at the short term gains and pleasures are not prepared for the trials and trajedies that are a natural part of life.
In the Middle East, a parched land, it would be tempting to build shelter on the sandy banks of a stream for easy access to water. Rocky ground would be higher, and require more daily effort to carry water each day. But when the rare rain storms did come, the streams and even dry water beds could rapidly flood. Shelter built primarily of baked clay (not wood) would be eroded by the rushing waters, and the foundation of sand washed out. The building on rock was a long term decision, not only what foundation material but also chosing a safe location, even if it required more effort.