As Yaakov Avinu lay on his deathbed in Parshas Vayechi, he doles out final brachos to his children. When it comes to his son Yehuda, part of the blessing states that the “the scepter shall not depart from Yehuda.” Ramban explains that this means that when there will ultimately be a king that rules over the Jewish people, that king will be from the tribe of Yehuda. However, the Chashmonaim were not from the tribe of Yehuda, but actually from the tribe of Levi. Their rule over the Jewish people deviated from the bracha given to Yehuda. Were the Chashmonaim right to take over the leadership?
Nachmanides maintains that, even though their victory was a tremendous feat, that the Chashmonaim themselves were very pious individuals, and they caused the Torah to not be forgotten by the greater Jewish population, as they assumed the monarchy, they were in violation of the mandate of Yaakov Avinu. Ramban continues that despite their tzidkus, the Chashmonaim were punished for taking over the kingdom. This is evidenced by four of Matisyahu’s sons being killed by their enemies as they each served as king. Furthermore, the Gemara (Bava Basra 3b) teaches us that anyone who posits that they descend from the Hasmonean dynasty is a slave. King Herod was a “Hasmonean” as he was a non-Jewish slave of the Chashmonaim, and eventually killed the remaining members of the family and usurped the throne.
All of this occurred, according to Ramban, because the “scepter” departed from Yehuda.
Rabbi Menachem Genack in Birkas Yitzchak, points out that Rambam states differently. In fact, Maimonides makes no criticism of the Chashmonaim at all. In Hilchos Chanukah, Rambam seems to infer that since a primary responsibility of the Kohanim was upkeep of the Beis HaMikdash, that only through their taking over the kingship could this kedushah have been maintained.