You can use this feature to open your camera and perform other useful tasks. It works even if you keep your iPhone in a case.
However, it is generally legal to install hidden cameras in a person’s own home, which is where the situation can become grey ...