In this quote, a tree is used to represent many qualities and failings. One of the failings associated with inflexibility is pride, another is arrogance. A big tree is sure impressive and it has strong roots but if its branches and trunk cannot move with the wind (or the times ) the wind will come right up against it and snap it right in half or uproot it. The sin of pride can be illustrated by a man who thinks he knows everything and will not listen to the opinions of others. Such a man is a foolish one, for he is arrogant enough to think he has nothing to learn. Even the poorest uneducated person in the wilderness has skills which we do not have - survival for example. So, we should always have open minds and the receptiveness to respond to new people, new ideas and new knowledge - before it railroads us!
I hope you are not asking for this to be explained in the context of some book because you do not give enough information for me to know what it is from. But I can explain the meaning of the quote.
What this quote is saying is that you have to be flexible or you will be destroyed. It says that a tree that bends and sways in the wind doesn't lose anything. But a tree that would not bend would just get pulled up by the roots and totally destroyed.
If you relate it to people, it's saying that if you don't give in sometimes, you'll be worse off than if you do. If you try to fight all the troubles that life throws at you, the pressure will build and you'll blow up. We often think that people who don't give in are stronger, but this quote is saying they'll be worse off than those who do.
The statement is a metaphor used to establish superiority of a humble and flexible approach as compared to a egoistic and rigid approach in dealing with opposition from others, and with adverse circumstances. When strong wind blows the trees and other plants that are flexible bend under the pressure exerted by the wind. This reduces the total force to which they are exposed. As a result even small twigs on the trees do not break away from the tree. However, trees that are rigid, and this generally includes the bigger trees, do not bend under the pressure of the strong winds. This show their strength. But in spite of this strength, such trees are more likely to be completed uprooted by the strong winds.
In this way the bending of trees is presented as a symbol of flexibility and humility, while remaining upright of big trees is presented as a symbol of rigidity and pride, and in this way the metaphor is used to highlight the benefits of humility and flexibility as a way of dealing with others and with the circumstances.