A lot of other games (the first one that comes to my mind is Zelda:BotW) also have NPC routines, opening hours etc. but if you look closer it's just a simple O(1) mapping between time ranges and expected state. It gets much more complicated when you actually try to pull off NPCs that may decide to do different things based on their modeled traits, react to in-world events or player actions etc. which I assume is what grandparent was talking about.