They 100% could, You don't even need advanced AI. Just basic stats on searches would have picked up the police spying on their ex's.
Mass surveillance might be the future, but it must be paired with accountability and restrictions on use.