For all it's faults and realpolitik, there is also an idealistic component to our foreign policy. Our policy toward Taiwan is a combination of great power struggles and idealism for a people's right to self-determination.
To look at only one side is to have less than a full appreciation for the messy complexity of our foreign policy.
I think the US has a complex foreign policy apparatus that is not motivated by a one-dimensional goal. We can have a genuine interest in promoting and defending democratic governments around the world when we feasibly can while also negotiating with non-democratic governments for other reasons. Our relationship with Saudi Arabia is motivated by our need for their oil along with other military interests, e.g. our mutual fight against ISIS.
If, and only if you are correct that the US is not interested in Taiwanese democracy, then a I suggest that the US is defending it for the same reason that Russia assists Syria and colonizing European countries were so desperate to buy land in Ottoman Philistine: They want a foothold in a particular region of the world, because they want to still be considered relevant in international geopolitical terms, as that would further their personal interests. Taiwan gives the US a foothold in the Far East. Now all they need to do is wait until China crumbles and then they can jump in and grab the best part of China for themselves.
I think it is possible that the US is interested in Taiwanese democracy and independence, but my skepticism is toward the idea that the US would go to war with the world's second-largest superpower just for that reason. Let me explain why I think so.
First, the cost would be monumental not just to the US but to basically every country in the world, because global trade and economy would be severely affected. Would the US go through so much trouble just for Taiwanese democracy and independence? I highly doubt it. Which country can even afford to do that, anyway? Imagine if the US directly went to war with major powers every time they practiced military aggression against a smaller country. That would never be feasible, no matter how noble the ideal would be.
Second, both are major nuclear powers. The US has gone to great pains to avoid any sort of direct military confrontation with Russia, a much smaller economic and industrial power than China, because of this as well as the risk of a third world war, and its method of pursuing its stated goal of preserving the democracy and autonomy of Ukraine has instead been provision of aid and military consultation. Would the US rely on Xi Jinping's being more stable than Putin and not ordering the red button pushed? I don't know, but it would seem too risky of a gamble.
Third, the US has demonstrated that it has no problem allying itself with dictatorships for various reasons as well as supporting their regimes. If Taiwan is an exception to this, I think there will be other interests driving that, not merely a desire to preserve democracy and independence. In other words, I could see the US going to war solely or primarily over an existential threat to its economic and military strength, but I couldn't see it doing so solely or primarily over a desire to pursue an idealistic vision of maintaining democracy globally.
I think Taiwan's status as the global mother lode of semiconductors and its strategically significant location both drive the US' commitment much more than preservation of democracy and independence, even if they may also be factors that act as the "icing on the cake," so to speak. And realistically speaking, I'm not sure I blame the US for this commitment, because submitting such a major global hub of the semiconductor industry—a core part of the lifeblood of any modern economy—to China could indeed prove extremely threatening not just to the US but to any country that misaligned with China's interests.