>>> issubclass(bool, int)
True
That explains everything. That is, bool is a subclass of int. That's why you can use a bool anywhere an int is allowed.
For a lot of detail, see the PEP that introduced the type.
EDIT: gloss
Note that Python didn't have a bool type for the first decade of its life. Conceptually "true/false" operations usually returned 1 or 0 instead. And Python programmers exploited that as often as, say, K&R C programmers exploited it. For example,
sum(x < 2 for x in some_list)
returned the number of elements in some_list less than 2. When adding the bool type, of course operators like < had to be changed to return True or False instead, but an enormous amount of code relying on 1 or 0 return values would have been broken. That's a key reason for why bool was made a subtype of int, restricted to the values 0 and 1 (with the fancier names False and True).