“To say it is an election is a joke,” The Wall Street Journal quotes Michael Cardozo, who served as New York City’s chief legal officer under former Mayor Bloomberg. He's talking about Democratic Party delegates voting to nominate their party's candidate for a judgeship in the Bronx, in which the Democrat "is all but assured the seat in the [general] election because the Bronx is overwhelmingly Democratic."
Several years ago the Second Circuit found New York's judicial election system unconstitutional but the Supreme Court reversed.
As the US Supreme Court explained:
The Supreme Court of New York is the State’s trial court of general jurisdiction, with an Appellate Division that hears appeals from certain lower courts. ...
Over the years, New York has changed the method by which Supreme Court Justices are selected several times.Under the New York Constitution of 1821, Art. IV, §7, all judicial officers, except Justices of the Peace, were appointed by the Governor with the consent of the Senate. See 7 Sources and Documents of the U. S. Constitutions 181, 184 (W. Swindler ed. 1978). In 1846, New York amended its Constitution to require popular election of the Justices of the Supreme Court (and also the Judges of the New York Court of Appeals). Id., at 192, 200 (N. Y. Const. of 1846, Art. VI, §12). In the early years under that regime, the State allowed political parties to choose their own method of selecting the judicial candidates who would bear their endorsements on the general-election ballot.See, e.g., Report of Joint Committee of Senate and Assembly of New York, Appointed to Investigate Primary and Election Laws of This and Other States, S. Doc. No. 26, pp. 195–219 (1910). The major parties opted for party conventions, the same method then employed to nominate candidates for other state offices. Ibid.; see also P. Ray, An Introduction to Political Parties and Practical Politics 94 (1913).
In 1911, the New York Legislature enacted a law requiring political parties to select Supreme Court nominees(and most other nominees who did not run statewide) through direct primary elections. Act of Oct. 18, 1911, ch. 891, §45(4), 1911 N. Y. Laws 2657, 2682. The primary system came to be criticized as a “device capable of astute and successful manipulation by professionals,” Editorial,The State Convention, N. Y. Times, May 1, 1917, p. 12,and the Republican candidate for Governor in 1920 campaigned against it as “a fraud” that “offered the opportunity for two things, for the demagogue and the man with money,” Miller Declares Primary a Fraud, N. Y. Times, Oct. 23, 1920, p. 4. A law enacted in 1921 required parties to select their candidates for the Supreme Court by a convention composed of delegates elected by party members. Act of May 2, 1921, ch. 479, §§45(1), 110, 1921 N. Y. Laws 1451, 1454, 1471.
New York retains this system of choosing party nominees for Supreme Court Justice to this day.