Largely to make it easier to add events and have the code organized separately.  It also makes it easier to match the styling used elsewhere, like the "Get This Book" popover, since it uses the same CSS.