It appears that a recent iOS 10 update has caused an issue where some users cannot lock iPad devices. I first noticed the issue when closing my smart cover would not lock the iPad. Initially I blamed the smart cover (it was new), however, when I could not lock the device using the lock button it was apparent it is a software issue.
Before doing the steps below you can ensure locking is enabled by reviewing the settings at Settings -> Display & Brightness -> Auto-Lock, and Lock / Unlock. If these settings are enabled and locking is not working, try the steps below.
1. Go to Settings -> Touch ID & Passcode (you will be prompted to enter your passcode).
2. Select Turn Passcode Off.
3. Restart your Device (hold the lock button until the option to power off appears, once iPad is off, hold lock button until Apple logo appears on screen).
4. Go to Settings -> Touch ID & Passcode.
5. Select Turn Passcode On. You will be prompted about deleting saved fingerprints - DO NOT delete your fingerprints as it is not necessary.
6. Test Lock Button and Auto-Lock to ensure it works!
Tested on iPad Pro running iOS 10.2.1 - your mileage may vary!