All in the world recognize the beautiful as beautiful.
Herein lies ugliness
Tao te jing. 2
By defining beauty we necessarily define ugliness, as not beauty or absence of beauty. By defining things that we want, we create the possibility of things we do not want. The Tao urges us to instead appreciate things for what they are, without desire. Such a thing might not be possible, but i find it a valuable exercise to consider what that might be like.
This concept isnt unique to taoism or even eastern thought. As antoine saint-exupery says
Ask not why the rose has a thorn.
Be grateful instead that the thorn has roses.
The little prince
In this context, we have defined the good, the beautiful – the rose. The absence of the rose, or its antithesis, the thorn, is then bad or ugly. But in reality, these things exist together. By changing your perspective, a thorned rose can actually be more beautiful than the thornless rose. (And I’d argue it is- why do we need “beautiful” things to be defenseless? Why is this closer to “perfection”?)

Being and non being produce each other
Tao te jing. 2
We spend much of our lives in fear of non being. That might take the form of death, anonymity, loneliness. But the possibility of life, love, and being known create their own antitheses. The good and the evil must co exist. And one brings value to the other.
All recognize the good as good.
Herein lies evil.
Tao te jing. 2
Philosophy loves to question what we consider to be good. It is a fair question – over the years, we often forget that our current sense of ‘goodness’ might have been defined in a foolish, selfish, or contextual way, and we aren’t actually aware of Goodness, of something approximating Truth. Maybe we are chasing something that isn’t what we could consider good now, but the goodness of a past self?
What if a symptom of regression also lay in the “good”, likewise a danger, a temptation, a poison, a narcotic through which perhaps the present were living at the expense of the future?
On the genealogy of morality. Nietzsche
Although we may believe morality or ethics to be objective, the goodness we chase in our lives (Aristotle’s happiness perhaps?) is more subjective, harder to define. Hard to be honest about it, even to ourselves. Some say to look at your actions, where you put your time – that is what you value. But just because you value something, doesn’t mean you need to agree with your own values. They can be flawed, and they can be changed.

Being dogmatic leads to stupidity. Dogmatism is the state of refusal to question ones beliefs. Thus, the dogmatic person doesnt actually think about their beliefs. Not in the fullest sense, anyway. The danger that the tao and Nietzsche hint at is dogmatic persistence in false beliefs, false values, and the unhappy life that follows.