They are two different things in the eyes of the judiciary.
The military can get away with surveillance under the mandate of defending the United States from all threats, foreign and domestic.
The product of that surveillance, however, is not permissible as far as I know in a court of law unless it's specifically UCMJ.
Not a lawyer though. If one is around willing to enlighten us on this odd question, it'd be much obliged.
The main use of surveillance is, always and everywhere, extortion. We see this daily among local, state, and federal police, abusing it to coerce the public to become informants; among prosecutors to coerce false admissions of guilt; and among spooks to convert formerly free individuals to "assets", and to enforce silence about abuses. It is used to coerce judges to issue unjust orders and decisions, to coerce witnesses to remain silent, and to coerce elected officials to vote against the interest of their constituents, or even to step down from an elected position or not to seek re-election. It is used to coerce awarding contracts or custom to undeserving suppliers, or to coerce lower prices in services sold.
Coercion need not be based on surveillance of the person coerced; it can come from surveillance of parents, siblings, offspring, friends, business partners, customers, service providers.