The fundamental idea encapsulated by this quotation is the Buddhist idea that one can never be satisfied, and indeed will always suffer, if one pursues and depends for one's happiness upon transient, inconsequential goals. The goal of acquiring wealth, or material possessions, for example, is ultimately transient and inconsequential. Linked to this idea is also the idea that suffering can ensue from ignorance of the cyclical, transient nature of the world.
When Hesse writes that "every goal was followed by a new one," he is implying that these goals are inconsequential. The achievement of one goal does not lead to lasting contentment or meaningful, permanent change. The achievement of one goal leads only to a fleeting satisfaction, which is then replaced by a period of longing for the next goal. Hesse compares this cycle to the cycle of water, from a river to vapor, and then to rain and a river once more. The implication is that to pursue one meaningless goal after another is as futile an exercise as it would be to hold out hope for and derive satisfaction from each stage in the water cycle.
This idea, that suffering is consequent of longing for transient, inconsequential goals, is an idea that I think most people learn at some point in their lives. Some people may be able to take the lesson to heart and act upon it, and many others may be too used to chasing after materialistic, inconsequential goals to ever really take the lesson much to heart at all. Personally, I don't suppose many people, in their final moments of life, regret not having made more money or not having worked harder to secure a promotion. I suspect that most people, in the final moments of life, regret not having loved as much as they might have, or not having been as kind, as generous or as happy as they might have been. The given quotation is significant because it encourages people, I think, to prioritize more meaningful goals, like happiness and love, rather than ultimately meaningless goals such as wealth and material possessions.