Selecting and deselecting classes from the class modal

Is there a reason why I have to use the “x” icon to deselect a class and not being able to do it the same way the class was selected?

Thanks for the clarification.