China was the one that gave all this publicity to Pelosi's visit not the US.
Even though this is the first time in a while that a high ranking US official visited Taiwan, still the level of rhetoric from China was and is so extreme, it's as if some one's mother was killed infront of him.
it was China that decided to amplify the visit as much as possible.
The Chinese leadership most likely saw just how weakened the US/EU are, and they calculated that in the current circumstances they will have the upper hand in a full trade war with the west. Xi definitely wants the reunification to happen under his term so his legacy surpasses that of Mao, not only that but regaining Taiwan would make Xi one of the greatest leaders in Chinese history since the failed Qing dynasty ruled China for hundreds of years. And since crazy a** Trump will rule the US till 2028 Xi doesn't have much time left before his lifespan ends, all these reasons combined have convinced Xi to strike.
The decision for an invasion probably was already taken before Pelosi's visit, they were just waiting for an excuse and then Pelosi came in and gave the excuse on a silver platter.
It was the US that fell in China's trap, not the other way around.
The aim of these current exercises is to bring more military equipment under the guise of exercises, plus another aim of these drills is also to confuse and exhaust the Taiwanese military because every time China fires a missile or sends an aircraft, Taiwan will have to scramble fighters, and the longer those Taiwanese fighters stay in the air, the more time they will spend on the ground for maintenance thus making it easier to take more of them out while they are still on the ground in one big missile strike.