Comparative advantage is the system theoretic solution that produces the maximum output of goods. This is done by specializing in whatever good or service you have a comparative advantage in and trading for everything else. From the ecological perspective, this optimally fills out all niches.
However, due to different savings rates between players, pursuing comparative advantage can still produce trade deficits. If you have a trade surplus, you are giving more than you are taking(*). If you are giving far more than you are taking, it may make sense to you to not specifically choose to specialize in your economically comparative advantage but do other things instead, like being unproductive; or producing things that are not comparatively advantageous but are simply fun for you or which has other reasons rather than mere productivity, such as resilience, localization, smaller environmental impact… there are other things to optimize, you know.
(*) This is a huge problem in a consumer driven economy. If consumers are not using up products as fast as they are making them, then they have no real reason to make them in the first place and realizing this, that is, when business owners realize this (which they do every 5-10 years), there’s no end of all the problems this moment of clarity causes.
Why do other things? Because there are more to life than being maximally productive. There are many many things you can not buy for money. Thus it makes sense to focus your life energy on those also rather than sacrificing them on the altar of productivity. Things like raising your own children rather than outsourcing this job to specialists. Or maybe things like cooking your own food or building your own chair. All of these can be more satisfying than making the most money. On a macro-scale, how wise was it really for the United States to outsource its industrial base to countries with lower labor costs and lax environmental standards?
I have run net-worth projections for several years now. I remember that if I had kept to my specialized career, I would have been a dollar-millionaire before I was 40. However, I realized, in time, that I would never really have any use for so much money. Instead of running a massive trade deficit, I would rather have 7 years of my life. Sure, I could donate it to charity, but I would rather donate my time. Perhaps it is selfish of me not to want to sacrifice for maximum systemic productivity. Or perhaps it was virtuous to slow down the rate of reduction of the natural world relative to the size of the human sphere. Who knows. In the grand scheme of things, what I do matters little. But what I do matters a lot to me.