Is it ethical for an instructor to "hack" my system as part of the evaluation for my thesis defense?
It sounds like as part of the defense, you gave the examiners access to the system for purposes of evaluating it.

If you gave consent for them to evaluate the system, and didn't place any restrictions on what they can do with it, I don't see any problem with what they did.

You are correct that is generally illegal to just "hack" into a system, but that refers to gaining unauthorized access to a system. That doesn't seem to be what happened here.