The 1st Amendment says Congress can't pass any law that prohibits the free exercise of religion. Since the legislation that established 501(c)(3) organizations acts to do exactly that, then that legislation violates the 1st Amendment and is therefore null and void.
You see, according to the Constitution, it's the Congress that doesn't have the right to do what it's done, not the churches.
You are conveniently forgetting that churches willingly give up some First Amendment rights when they choose to remain a non-profit.
If it's a simple case of being a violation of free speech rights then please explain why a non-profit hasn't sued over the issue.