Absolutely.
If each and every jurisdiction has the authority to implement its own gun laws, it will create an illogical tangle of conflicting legislation which would effectively nullify Second Amendment rights.
Kansas City and St. Louis have historically been anti-gun, so the state legislature made sure that no local ordinance could trump state law. It makes sense, because everyone would be in a danger of becoming a felon if they didn’t know each municipality’s laws.