when your device has a passcode , its usb is shut off to the world , and no other computer can access it, until you enter your passcode and click on trust., and your file system is encrypted until you unlock it
one you enter your passcode, and click on trust, that computer running itunes no longer needs you to enter the passcode to access it, you can change the passcode on that iPhone, and that computer will know how to access it
i don't know how you change your mind and revoke this. so don't do it to another persons computer.
incorrectly guessing a passcode will introduce delays into the lock screen, if you change your passcode to 6 letters and numbers, like a1a2a3, it can take a hacker 5 years to try all the combinations
keep your iOS software up to date. there has been problems with buggy lock screens before., where it was discovered that you could still gain access, if you are worried about your privacy, use a random easy to remember iCloud password. use security questions that would be hard to guess. and use a lock screen password of at least 6 letters and numbers., and never jail break your device.
the 4 digit passcode is good enough, it will still take that person a very long time to brute force it