US Marshals and county sheriffs are officers of the court. Police departments (including the FBI) are officers of their executive branches.
Police are Officers of the Court.
The police enforce the law passed by the Legislature
When a Police Officer arrests a person for breaking a law, he doesn't take that person for trial before the city council.
The person is remanded to the Custody of the Court.
If the Court issues a Warrant the Police Officers of the Court serve that warrant.
Because of Habeas Corpus all legal matters must be brought before the Court.
If the Polilce are involved, you are talking to the Court.
It is the legislative branch that passes the laws and pays the salaries of the Officers of the Court
But the power of the police and ultimately the Boss is the Court.
Habeas Corpus, The Great Writ
Back in the Merry Old England, the local Nobleman (law maker and police payer) could detain a person
And it was entirely up to the Nobleman for how long, under what conditions and what penalties imposed
The Magna Carta established Writ of Habeas Corpus
Any person taken into custody by the King's men had to be taken in front of a Magistrate (Judiciary)
The Magistrate then had the power to adjudicate the Law and impose penalties.
Therefore the police who arrest and detain people are Officers of the Court.
The police were no longer under command of the Nobleman (Legislature)The police are under the command of the Magistrate (Courts)