When hoppers are locked they occasionally allow items to leave them any way. It doesn't happen all the time, but it makes redstone unreliable.
Comments 4
If you rely on pistons to control the locking know that it frequently causes issues with number of items pulled. I've had to adjust the number of items in a filter to prevent it occasionally breaking my sorter
Cleaning up old tickets: This ticket has not been updated recently (1 year+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki
To clarify, locking a hopper does not prevent items from being removed from it. It just prevents the locked hopper from pulling or pushing items. Another (not locked) hopper can still pull items from a locked hopper, meaning items can leave a locked hopper legitimately. Since you've used the word "leave" instead of "push", I wanted to make sure this isn't what you are seeing.