A previously undocumented requirement asks for a passcode in a very particular set of circumstances: When the iPhone or iPad hasn’t been unlocked with its passcode in the previous six days, and Touch ID hasn’t been used to unlock it within the last eight hours. It’s a rolling timeout, so each time Touch ID unlocks a device, a new eight-hour timer starts to tick down until the passcode is required. If you wondered why you were being seemingly randomly prompted for your passcode (or more complicated password), this is likely the reason.
Makes sense that I seldom bump into this on my iPhone, since I only sleep about six hours most nights. But I’ve often wondered why my iPads, which I don’t necessarily pick up first thing in the morning, need a passcode so often. I assumed it was a bug.