The recording may be allowed but later use of that data may not be. For example if it was being used to aid criminals to commit crimes.
Edit: Flock is/was breaking California state law by allowing outside partners to illegally access data collected in California.
Guns are legal but murder is not, so ... yes?
It makes sense to me that recording public activity may be legal but publishing those videos would not be (for example name-and-likeness copyrights).
Or that you'd need a warrant to search those videos and issuing a warrant comes with a one-time key that decrypts the search parameters you specified in advance to get the warrant.