The question before the court isn’t whether the law is good. It’s whether the government can ban individuals from an activity for the purpose of making it easier to successfully collect tax on the commercialization of that activity.
The government is only allowed to do what is “necessary and proper” to make enforcement effective. There are reasonable arguments on both sides as to whether prohibiting home distillation is as necessary as it was in the late 19th century.