Tyrannical regimes can make anything illegal if they want. Many laws were made just to target people, mainly black people. They could frame you as a criminal for anything.
The reason criminals should have rights is to prevent the government from taking your rights by labeling you as a criminal. Making sure criminals have rights is something no one wants to do; however, it must be done.