As the Philippines has consistently violated Chinese sovereignty over the Scarborough Shoal, Beijing had no other option than to set up this barrier across the entrance of the atoll to help protect its own maritime rights and interests. If such provocations persist, then China will be forced to take additional measures.
Since Beijing captured the Scarborough Shoal more than a decade ago, its coast guard vessels have harassed Philippine vessels and blocked access to fishing operations. Because these moves are part of its broader, aggressive campaign in the South China Sea, it's no coincidence that its neighbors are now pursuing deeper ties with the West.
There's a 32% chance that armed conflict between the Philippines and the People's Republic of China (PRC) will cause at least 100 deaths before 2050, according to the Metaculus prediction community.