Military Operations always entail a degree of risk. A chance of messing it up, botching the execution, or otherwise causing the operation to fail.
The more risk that there is in a given operation, the less credible that operation is. For example, if one imagines a hypothetical invasion of the Continental US led by, say, the armed forces of Italy, it does not seem likely to succeed. Therefore, the US is acting reasonably when they discount a threat of invasion from Italy, based on current information.
To get back to China and Taiwan; China does not consider Taiwan to be independent, and have repeatedly asserted that they do have a right to secure the territory, by force if necessary. The US (and others) are required to evaluate this threat's credibility. If the US believes that the threat is credible, then they will be forced to assign a greater weight towards actions based on diplomacy and compromise. If they feel the threat is not credible, then the US is free to set an aggressive or confrontational foreign policy.
For China, then, to execute military exercises simulating a blockade or invasion of Taiwan, is a statement of credibility. They are saying, in effect, "Look here. Pay attention. See how we have just run a drill, a realistic drill, wherein we have practiced a successful invasion of Taiwan? We have done so openly and in full view of your spies and satellites. You know, just as well as we do, that this drill went well. Therefore, you now must accept that we have the ability to launch a successful invasion of Taiwan."
Their objective is to force US planners and policy makers to realize that the invasion of Taiwan is something that China has within its likely capabilities. In the absence of these military maneuvers, policy makers may, in effect, say, "I know China wants to invade Taiwan, but realistically, they can't, so we're free to ignore their demands.". Now, having seen a successful military drill of an invasion of Taiwan, these same policy makers are forced to say, "I know China wants to invade Taiwan... and it turns out that's something they could realistically do... so rather than risk it, we should probably be more diplomatic and considerate of their position."
So the military operation achieves a real-world result that is beneficial to China's interests, which is why they would undertake such a costly and risky operation. Its why we frequently see these in times of tension, from all kinds of international actors. They need their rivals to appreciate (and hopefully be deterred by) their ability to project force.