From here : https://support.apple.com/en-us/120421
> If your Mac asks whether to require Mac login to access your iPhone, choose Ask Every Time or Authenticate Automatically. You can change this later in iPhone Mirroring settings on your Mac.
Seems its an app setting to have this protected or not ?