No I've never been to Somalia. Have you?
Actually, yes.
And there really is a BIG difference between an AK47 armed Somali (pretty much all of em) and an RPG armed Somali. RPGs aren't cheap ya know, you take one of those out then you mean to use it.
And as for waiting for them to attack, do you really think a Somali pirate boat is going to do anything silly with a Royal Navy destroyer parked 800 yards off their stern displaying a sign that says "We're watching you pal."? Somali's might not be as sophisticated as us westerners but they're not stupid.
In this particular case there was a big, slow mothership with a small, fast skiff in tow and the crew were armed with small arms and high explosive projectile weapons. If they're not pirates then my name is Angus McTavish and I wrestle polar bears for a living.
As for the legality......dunno what law in your part of the world says but in this country you can be arrested for "going equipped" to commit a crime. For example, if you're discovered outside a bank at 3am with a crowbar and a ski-mask you're getting nicked chummy.