Of course, it's a right decision.
Before 2021 T20 world cup, Virat Kohli was asked to leave ODI captaincy. The communication between Virat Kohli, The BCCI President and the Selection committee didn't go well. Different entities had different explanations.
Further, Virat Kohli stepped down from T20i leadership of India and Rohit took over. As a result of constant injuries and ‘Rests', a lot of series saw new captains. Kl Rahul, Jasprit Bumrah, Shikhar Dhawan, Shreyas Iyer, and Hardik Pandya all became captains. There wasn't a stable leadership in the Indian dugout.
Asia cup and world cup squads had some unexpected exclusions. India eventually lost both the tournaments. Selection committee didn't do everything good. So, I feel they definitely deserved to get sacked as a unit.