Not sure if lego cops have guns.
Anyways, about pirates, cowboys, knights and such having weapons: Somehow those fanatics dont care about that unless they are really terrible. It's usually just the modern settings that they pick on since they think children will identify strongly with it. Though you do hear about parents who take away the weapons of their children's pirates, cowboys and knights too.
Nothing I agree with, but its just how their twisted logic works. Same reason why they have produced salloons and taverns, but construction workers with beer cause a controversy.
Regarding lego not having anything to be jalous of... well not anymore at least. They are mostly just scoring over the succes of established movies.
They did however do plenty of things earlier in lego's golden age that pretty much spanned from the 80's to the 90's that could be envied.
While playmobil has released the occasional nice space sets, overall I'd have to say that Lego has been far more succesfull in the space theme with all kinds of interesting spaceships that had smaller ships coming out of them, monorails, rockets, and plenty of interesting factions. In the late 90's they ran out of inspiration sadly enough, but before then they pretty much released one succesfull space theme after another without using any licenses.
Stuff like this UFO for example was released at the creative peak of that theme:

Opinions on the looks might differ, personly I think it looks quite stylish. But the brilliance in the design is that theres an exploration vehicle inside that can be taken out with a robotic arm, a smaller exploration cart under a hatch, and a smaller ufo on top attached with magnets.
And lego did stuff like this all the time with their space themes, having smaller exploration vehicles inside a larger one. This is simply the only good example I personly have of it.
Also, while Playmobil was earlier with pirates, I'd say that Lego has been very strong with their own pirate theme in its early years, before they ditched it after releasing a rather poor batch later in the 90's.
Stuff like the port here:

Is certainly something I would love to see playmobil do sometimes. It has a harbour, a crane, various small buildings to store goods and it even comes with the small tradeship thats laying next to it. It gives the soldiers something to protect, and the pirates something to plunder. Thats always been missing from playmobil sadly enough.
Considering how Playmobil has released so many civilian sets for the medieval theme in its heyday, its quite surprising that they never did that for the pirates theme while even lego did that, and they had very little civilian stuff in any historic theme at any given time.