Sometimes leaders can still make not rational actions. Putin still didn't need to invade Ukraine. I think the same can happen with Taiwan. For me I also believe "they don't really need Taiwan" but I think a lot of Chinese people think about it not in economical reason but national/historical and military reason - many of them say that china is really afraid if US will start putting their own military bases in Taiwan so they supposed to don't care much about Taiwan as more wanna control the land.