This thing would actually be well suited to anti-submarine role. Because acoustic signature wise enemy submarines may not be able to tell it apart from normal civilian container ships.
Unrestricted submarine warfare unrestricted anti-submarine warfare
Same thing when enemy warships radar shows a signature consistent with civilian ship but is actually an armed ship. This increases radar clutter and workload for the enemy as they now have to treat all return signals as a potential threat. It also makes them uncertain as to whether they've given their positions away to 'civilian' ships fitted with the necessary radio-emission detection assets.
China is saying you think shipping is our Achilles heel? Now we gonna make sure you knock yourselves out and die on this hill.
Having the biggest industrial capability really is the multiplier that adds zeros no matter how big the first number is. Whatever games you choose to play we're just gonna swamp ya. It's brutallisticly simple.
以斗争求和平则和平存,以妥协求和平则和平亡。
Submarines would have to consider that every containership or fishing boat might have a containerised TAS or VDS system.
It also means the possibility of containerised VLS tubes containing rocket-launched ASW torpedoes.
In addition, maritime patrol aircraft (trying to enforce a blockade on Chinese shipping) now have to consider that they may be shot down by the cargo ship they are trying to visually identify.
---
From a strategic perspective, China is the world's largest trading nation and derives the most benefit from seaborne shipping, so China wants trade to continue flowing through the South China Seas and the Malacca Straits.
In comparison, the US would be trying to impose a blockade on China, because the US has a much lower dependency on cargo shipped through these areas. Note that the China-ASEAN trade is intermingled, and it is in ASEAN's interest to keep trade flowing through the South China Seas and Malacca Straits.
Having armed cargo ships makes the job of enforcing a China blockade much more difficult.
---
I also suspect that this ship and its containerised weapons is a direct result of:
1. The US losing the recent trade war to China, where it is now clear that China can cripple US industry whereas Chinese industry is unaffected. (Due to rare earth shortages, Ford was shutting down car factories and Raytheon was 3 weeks away from stopping missile production, as per Gavekal)
It's also clear now that China has the upper hand over the US (with rare earths) for at least the next 3 years and possibly up to 10 years.
2. Previously, I suspect that the Chinese didn't pursue containerised weapons because China still wanted Chinese ships to send Chinese containers to the USA. But 2 months ago, the US effectively banned Chinese ships from US ports by imposing punitive port fees on Chinese ships. Plus we had the US imposing punitive tariffs on China this year anyway, before the US backed down.
Granted, the tariffs and port fees have now been put on hold as part of the trade war "truce", but this truce only lasts a year.
So it's reasonable to assume that the US will ban Chinese ships again as soon as possible, as well as ramp up tariffs as soon as possible.
---
So given that there is nothing to lose, China might as well pursue containerised weapons now.