1. When the currently targeted floor is deselected and the remaining selected floors are all in the other direction: Then the elevator would have to either reverse course without stopping — a situation which otherwise doesn’t occur and would be unexpected and possibly dangerous for the passengers — or stop on a non-selected floor before changing direction, which would be confusing as well.
2. The deselected floor was the only selected floor: The elevator would then have to choose a floor to stop on by itself — e.g. the next one it can safely stop on — which is also a situation that doesn’t otherwise occur. In addition, deselecting the only selected floor doesn’t seem to be a practical use case.
So instead of having to define, implement and test a behavior for those odd situations, it’s safer and less costly to just disallow deselection.