Welcome to iMore.
There is only one reason I can think of and that is you are putting in the wrong passcode.
Here is a guide on how to reset your passcode, but you will still require Apple ID once you do. I'm pretty sure it's nothing else as you say you are able to try. My only other possible suggestion would be to do a hard reset. Hold the power & home button at the same time until you see the logo. Then release the buttons and wait for it to finish. Then try the passcode again. If I remember correctly you only have 10 attempts before it will lock your device. Thanks!