One is a state law and one is an unconstitutional federal law. Any powers not directly given to the federal government by the constitution are only given to the states.
Allowing them to tax us as a penalty for not purchasing something is just a sly backhanded way of avoiding the powers NOT given to them by the constitution.