Yeah but WHY is it selectively enforced? Is it just laziness or a tacit recognition of how fragile their power base really is?
I think because the law was poorly crafted -- in the case of mag limits. Carving out an exception for "long guns for which there is not a handgun capable of using the same mag" was evidence of a lawmaking body with little understanding of firearms and the engineering involved. By also banning "assault pistols" it muddied the waters. Since nobody can possess such a pistol, it's illogical to ban the magazines they would have/could have used. But the law wasn't written for logic. So, rather than worry about enforcing it, they simply keep it as an additional charge should someone be arrested for other crimes. But, carry a 17 round mag in your Glock 17, and any Cop that finds out will show no hesitation in cuffing and stuffing you.
As for fireworks, an arrest and conviction requires they know who possessed them and who set them off. Without witnesses or video evidence to use in court, the Cops are all but powerless to do anything. This year, there were ads from HPD saying if you see someone with illegal fireworks, report them. HPD needs your help to enforce the laws.
Without citizens helping them enforce the law, I guess they can't enforce it on their own to the degree needed to put a stop to it.