Just a scenario:
Let's say you are fletching logs. You implement a conditional sleep to check if your inventory doesn't contain anymore logs, or you're not animating anymore. When the conditional sleep has been met, you add a random sleep because it's not human-like to instantly bank for new logs, all the time. This is because humans tend to AFK fletching and it can be a couple of seconds before the human notices the inventory with logs has been fully fletched.