When you first create a traffic class based on DEVICE matching rule, the class is sorted towards the top in the class tree as expected.
If you remove the DEVICE matching rule from the class, the class is expected to be sorted towards the bottom.
However, the class is still sorted on the top even after deleting the DEVICE matching rule.
This behavior happens because it is a special DEVICE based class and the sort order association for the class remains the same as before even after modifying the matching rule.
Deleting the class, then, recreate a class without DEVICE matching rule.
If you do not want to delete the class after making the matching rule chance, mark the class as "Exception", then revert it back to "Standard". This operation will recycle the sort order association and have the class sorted at the appropriate level.