'בָּרוּךְ אַתָּה ה' אֱלֹקֵינוּ מֶלֶךְ הָעוֹלָם, אֲשֶׁר קִדְּשָׁנוּ בְּמִצְוֹתָיו וְצִוָּנוּ וגו
Blessed are You, L-rd our G-d, King of the universe, who sanctified us with His commandments and commanded us...
The above formula is used in most brachos we make over mitzvos, examples being when we put on tzitzis and tefillin, when we take the arba minim, and when we read the Torah in shul.
But the formula is also used in mitzvos such as lighting the Chanukah menorah and reading the megillah on Purim. I understand that these events have become mitzvos through rulings of the Rabbis, who have the authority to do so, but I don't understand why we use this wording for the blessing recited before performing the mitzvah.
The word is ּוְצִוָּנו, "and commanded us". But with certain mitzvos, G-d didn't command us, the Rabbis did. (It's not like G-d told us to read the megillah on Purim at Har Sinai, that doesn't make any sense.) So why would we use this formula for mitzvos that were instituted by the Rabbis?