1 Answer
1

The term elohim means power which is also why idols are called elohim acheirim. Pagans regard their gods as beings which manifest various powers, somewhat like comic book characters (like the X-Men). They regard the concept of Hashem as too lofty to be connected to human beings and therefore worship the powers that have direct control or connection with the physical universe (see the Chabad citation at the end of this post).

In the case of the courts, they are a group of people who have been given the power by Hashem to enforce the rules of the Torah. Thus, their connection to Hashem gives them the name powers.

This name of G-d is based on the Hebrew word “el” which means simply
“power” or “strength”. An example of this usage is in the description
of Lavan’s pursuing and confronting Jacob during his return to the
Land of Israel. Lavan says, “Yesh b’el yadi [sic] - It is in my power to do
you harm, but the G-d of your father addressed me last night [in a
dream] saying, ‘Beware of speaking with Jacob either bad or good’”
(Gen 31:29). Rashi and Onkelus both explain “el” to mean power or
strength.

The name “Elokim”, then, in reference to G-d, connotes His complete
mastership and control over everything.

A third usage of this term refers to judges. For example, if on
account of poverty or theft a Jewish man was indentured to work for a
Jewish master, then chose to stay in servitude despite being given the
opportunity to be released, he was to be brought before the “elohim” –
judges – who would order that the man’s ear be pierced symbolically
stating, “G-d says the Children of Israel are My servants; and this
one chooses to be a servant of a servant!” (Ex. 21:6).

However, regarding this last usage, the commentaries suggest a
relationship with “Elokim”. Namely, the Torah court of judges is
called by the word for G-d since it carries out G-d’s laws on earth
(Ibn Ezra). Alternatively, because G-d’s Presence and influence rests
upon the judges (Ramban). This is based on the Sages’ explanation of
the verse “in the midst of judges (elohim) G-d will judge” (Psalms
82:1).

They knew of this concept of Havaya, but they considered it far too
lofty an idea, seemingly inaccessible and irrelevant to their lives.
Instead, they connected to the many forces of nature. They called
these "Elohim"—meaning, "mighty forces."

That's why, as the Biblical commentator Baal HaTurim points out, the
Hebrew letters in the name Elohim have the same gematria (numerical
value) as "haTeva"—which means the natural order.