It probably prevents armed warships from attacking them. It doesn't, as you correctly point out, prevent guerilla warfare.