Your observation is not wrong. This is a printing error in the book. The code snippet on page 163 that outlines the authenticate method for the UserIdentity class is from the code generator of the previous version of Yii (1.0).
The book was started using version 1.0 and then upgraded later to be compatible with version 1.1.2. Unfortunately, this small snippet of code was not altered from the original version. As you mention, this is really not needed and only printed for a quick reference to the auto-generated code. It does not impact the application or the discussion about authentication in Yii.
Thank you for pointing this out, we will fix this in subsequent versions of this book.