CHINA PRESENTS the rest of the world with a puzzle when it announces, each year, another big leap in defense spending. On March 5, it revealed a 12.2 percent increase over last year, to almost $132 billion, the second-largest military budget in the world after the United States (which remains far larger at $526.8 billion). The puzzle is not whether China can afford such a budget — clearly it can — but what does it need it for? What are China’s intentions and capabilities?

China has often asserted that its rise is peaceful. But that is hard to square with its more aggressive approach to asserting sovereignty and control over various maritime and air zones in recent years. In November, China announced the imposition of a new “air defense identification zone” over a broad swath of the East China Sea, demanding that planes identify themselves to China and obey its orders. While the United States is neutral in the region’s territorial disputes, it has made clear that it will not abide the air defense zone and has sent military jets through it without hewing to China’s demands. But Beijing’s move raised again the uneasy prospect of a military conflict, perhaps triggered by something as simple as an overflight error.

China strives to be a regional superpower, not a global one, at least for now. It has put an emphasis on developing advanced weapons systems that could deliver what the United States calls “anti-access/area denial,” meaning to deter adversaries from areas that China claims — or to expel them. Thus, China is investing in weapons such as long-range cruise missiles and an anti-ship ballistic missile designed to hit an aircraft carrier. Such investments pose asymmetric threats to the United States and its allies. Andrew S. Erickson of the Naval War College presented estimates to the U.S.-China Economic and Security Review Commission in January that China could build some 1,227 of the anti-ship missiles for what it costs the United States to build a single Ford-class aircraft carrier. It might take just one missile to kill a carrier.

China remains frustratingly opaque about what’s actually in the military budget. More transparency would go a long way toward easing anxiety about it. China’s defense spending is believed to be quite a bit larger than what is reflected in the official budget number. But there are also unseen restraints, including inflation and the fact that the Chinese economy appears to be slowing down.

China’s defense boost comes at a time when the United States and its allies are struggling with shrinking military spending. The United States has declared a broad pivot toward Asia, and it seems a wise priority, given China’s behavior and its resources. Even with breakneck increases, China’s defense spending, at official levels, is still just 1.5 percent of its gross domestic product, far lower than that of the United States. China can probably afford to fulfill its ambitions. That is no puzzle and will be a challenge to the United States and its allies for years to come.