Former president Castillo attempted a coup d’état. That situation fuelled an immediate reaction from all of the democratic institutions, including the Congress. They immediately considered that it was right to vacate former president Castillo because of the attempted coup d'état and they used that article.
That's the answer I can give you. It was something that was within the power of Congress.