I believe the ridiculous explanation was that citizens cannot carry arms, but visitors to their planet were allowed religious freedom. Since Bo and Din are Mandalorians whose religious beliefs include wearing armour and weapons, they were allowed to carry them since they were visitors. The other Mandalorians could not enter with weapons because the city laws considered them as citizens since they were employed by the city.
Pretty weak explanation, but then the whole sequence was pretty weak, including casting Lizzo and Jack Black, who were a waste of space with no apparent effort given toward their characters.
It's the one rather glaring plot hole considering this planet and Navarre. The Mandalorians were being paid as an outer security force and they just up and left. On Navarre, they'd been given land for rescuing the city from the pirates, but there was at least an inference that they were considered an adjunct police force considering that Carl Weathers again told Mando the offer to employ him as "sheriff" still stood. Again, they just all left. No explanation or agreement made about it.