In case of ground invasion (or just to detect enemy drones in the sky) having access tonlots of cameras is of military use.
In the case of Iran, having access to tonlots of cameras proved to be an incredible assets for a neighbor’s military.
What’s more likely is that an aspiring dictator illegally uses the military for domestic police operations, then military and police use is the same thing.
https://www.brennancenter.org/our-work/analysis-opinion/cour...
Not a likely scenario, FWIW: https://www.military.com/history/5-reasons-why-geography-ame...
I would expect any invading forces would need to be surveilled by planes or satellites, or perhaps drones, since they would immediately destroy something like flock cameras.