If Satan is obedient to G-d and works under his authority, why did HaShem reprimand him in Zechariah 3:1-2?
Read the Pesukim in context, with an assist from Rashi, and all will become clear.
וַיַּרְאֵ֗נִי אֶת־יְהוֹשֻׁ֙עַ֙ הַכֹּהֵ֣ן הַגָּד֔וֹל עֹמֵ֕ד לִפְנֵ֖י מַלְאַ֣ךְ יְהוָ֑ה וְהַשָּׂטָ֛ן עֹמֵ֥ד עַל־יְמִינ֖וֹ לְשִׂטְנֽוֹ׃
And [Hashem] showed me [Zechariah] Yehoshua the Kohen Gadol standing before an angel of Hashem, and the Satan stood on his right to prosecute him.
לשטנו. להשטינו על שהיו בניו נשואים נשים נכריות כמו שכ' בספר עזרא וימצא מבני הכהנים אשר הושיבו נשים נכריות מבני יהושע בן יהוצדק:
To prosecute him regarding that his sons married non-Jewish women, as is written in Sefer Ezra, “And he found among the children of the Kohanim whom he returned non-Jewish women from the sons of Yehoshua Ben Yehotzadak.”
Back to the passuk:
וַיֹּ֨אמֶר יְהוָ֜ה אֶל־הַשָּׂטָ֗ן יִגְעַ֨ר יְהוָ֤ה בְּךָ֙ הַשָּׂטָ֔ן וְיִגְעַ֤ר יְהוָה֙ בְּךָ֔ הַבֹּחֵ֖ר בִּירֽוּשָׁלִָ֑ם הֲל֧וֹא זֶ֦ה א֖וּד מֻצָּ֥ל מֵאֵֽשׁ׃
And Hashem said to the Satan, “Hashem rebukes you, the Satan; Hashem, He Who chooses Yerushalayim, rebukes you. Is this not a brand pulled from the fire?”
Back to Rashi:
יגער ה' בך השטן. יגער הקב"ה בך אתה השטן וחוזר ואומר ויגער ה' בך הוא הבוחר בירושלים שלא תכנס לפניו לקטרג על הצדיק הזה הלא ראוי הוא וזכה לכך שהוצל מאש השריפה:
[...] That you not enter before Him to argue against this righteous person. Is he not fitting and worthy of being saved from a fiery furnace?
In other words: The Satan was doing exactly what he should be doing - prosecuting - but Hashem was telling him that he has no right to prosecute a Tzaddik such as Yehoshua Kohen Gadol.
It is first important to remember that prophecy is primarily spoken in the language of allegory, riddle and allusion.
An alternative way of reading the Hebrew is to understand that the "you" who will be rubuked is not the Satan, but "Yehoshuah, HaKohen HaGadol". That is an allusion to Moshiach ben Yosef. The first posuk states explicitly that Yehoshuah is standing before "the Angel of G-d", and then clarifies who that angel is by name as the Satan, whose job is to accuse and prosecute.
In Zechariah 3:2, it goes on to explain that G-d says to the Satan what his job will be. Meaning that the Satan will rebuke/accuse in regard to Yehoshuah, HaKohen HaGadol who is the one who is chosen by G-d in regard to Jerusalem.
According to traditional Jewish teaching, the Heavenly figure referred in the prophecy as Yehoshuah HaKohen Gadol is Moshiach. This is the same name for example, that was referenced by Rabbi Yitzchok Kaduri, zt"l in a handwritten note made famous toward the end of his life. It associates the Kohen Gadol to Moshiach like is found in VaYikra 4:3 which says:
אִ֣ם הַכֹּהֵ֧ן הַמָּשִׁ֛יחַ יֶחֱטָ֖א לְאַשְׁמַ֣ת הָעָ֑ם וְהִקְרִ֡יב עַ֣ל חַטָּאתוֹ֩ אֲשֶׁ֨ר חָטָ֜א פַּ֣ר בֶּן־בָּקָ֥ר תָּמִ֛ים לַיהוָ֖ה לְחַטָּֽאת׃
Which Sefaria translates as:
If it is the anointed priest who has incurred guilt, so that blame falls upon the people,
So to answer the Why aspect of your question, this means that the blame for the sin of the Moshiach lays with the Jewish people. As their representative, meaning the representative of the whole nation, the Tzibbur, Moshiach brings the korban.
The angel referred to in this prophecy is, according to traditional Jewish teaching, pertaining to Armilus HaRasha, who is also called the embodiment in this world of "the Satan". An example of this can be seen in Sefer Avkat Rochel by Rabbeinu Makir ben Abba Mori in the first book, Section 1, Sign 7 of the ten signs of Moshiach.
Zechariah's prophecy here is explaining how the struggle between Moshiach and Armilus, who is also referred to by the Christians as the "anti-Christ", is actually directed by G-d.
The concept of this prophecy is also referenced in Bereshit Rabbah 56:9-11 which associates it with the Binding of Yitzchok.