Congress has passed authorizations for a ton of unethical things, historically. "Legal" does not mean "morally right".
Most of NSA's warrantless surveillance was probably technically legal, or at least did not constitute mens rea, but that doesn't make it any better.