Why doesn't the City simply pass its own laws to take care of these matters?

Ironically, unlike many other states in the nation, New Hampshire is not a "Home Rule" state. Although New Hampshire is a small state and claims to cherish local control, the New Hampshire State Legislature has never seen fit to allow the municipalities any significant degree of "Home Rule". What this means is that as a general rule, municipalities in the State have the authority to do only what they are specifically authorized to do by a specific state law. If there is no state law authorizing it, then a municipality can't do it. In a true Home Rule state, a municipality is free to pass any laws that it wants as long as such laws do not conflict with the state constitution or existing state laws.