Most of the times it's just a check that the bot is not making too many request, sometimes using a recent request list, sometimes asking the browser to make a very hard calculation that takes a few seconds to slow down everyone. It does not distinguish good bots and bad bots, just try to protect the server against too many requests.