Their "Mission" page indicates their SIGINT mission:
"""
The Signals Intelligence mission collects, processes, and disseminates intelligence information from foreign signals for intelligence and counterintelligence purposes and to support military operations.
"""
Collecting All the Things is not in the mandate, but it's a very effective way to meet it. I'm not even sure how they'd go about collecting only mission-specific information without being able to peek at the metadata they collect on us all.
I don't like it, but I don't see an alternative way to do what they are mandated to do.
Ah, but they don't know if it's a foreigner until they look at it. So might as well collect it all and figure out which ones are the foreign ones later. After all, the data's not actually "collected" until an analyst looks at it. It's a sort of Heisenberg-data - only exists when you look at it. While it's sitting in the NSA data centre, it's entirely harmless!
Where is this written down?
Facts matter. Especially in debates like this.