> While gun ownership is a right how is it legal for a goverment to require ownership <
Perfectly OK under the militia powers inherently held by each state — powers that legally may be delegated by a states to its city and county governments.
(Militia powers predate the U. S. Constitution, and as such they are guaranteed to the states by the Tenth Amendment.)
bump