Corporate law is overwhelmingly state law. Every federally tax exempt entity is a state (or foreign) corporation or other kind of entity, and states (or foreign governments) impose rules on corporations registered in their borders.
Plus, many states levy their own corporate taxes. A nonprofit corporation needs to secure tax-exempt status from states as well as the federal government. This is a necessary implication of America's dual-sovereignty system.