It isn’t random. They search phones belonging to people they suspect of crimes, but don’t have enough evidence to get a warrant for, people they think are connected to criminals even if they are not criminals themselves, and people they want to harass such as activists.