In addition to their shared vision to uphold and enforce the law, what drives criminal justice organizations and their actors, both formally and informally?
In general, criminal justice organizations are driven by a bureaucratic need to execute their missions. As the question stipulates, a shared vision of enforcing laws is the common denominator. That vision, however, cannot be divorced from other considerations. It is absolutely central to the "raison d'etre" of the organization. There does exist, however, a legitimate phenomenom in which organizations function on automatic, pursuing the goal irrespective of other considerations, like extenuating circumstances that explain a criminal act. It is left to the prosecuting office to determine whether to go forward with a criminal trial. For the law enforcement agency conducting the investigation and making the arrest, their job ends with the arrest, although they will likely be called upon to testify should the case go to trial.
Bureaucratic inertia, as the phenomenon is called, drives an organization forward, sometimes without regard to mitigating circumstances. An individual's job is to conduct an investigation and make an arrest. That job will be executed. The organization exists to support that mission; it is a self-perpetuating cycle.
An entirely different factor motivating law enforcement organizations is the political agenda of the elected officials. When a U.S. president announces that his administration is prioritizing enforcement of a category of laws -- and the war on drugs is a classic example -- law enforcement organizations evolve as necessary to be identified with the execution of that agenda. The budget follows that agenda, and the organization wants those financial resources to increase and improve its capabilities in line with both its underlying mission and to demonstrate its continued relevance. To be seen as irrelevant to the agenda of the top officials is to risk loss of budget and prestige.