but also want to learn how and why it works
His code is commented more completely than most so that will help.
Try going through the code and figuring out where all the 'magic numbers' come from.
For example this part deals with the LCD controller. You will have to use your Google skills to come up with a data sheet for the HD44780 controller. Then you will have to look through that data sheet to find the 'Instructions' that the controller uses. Finally you have to compare the magic numbers with the instructions. Unless you are fluent in Hex you should convert the magic numbers to binary. If you try converting everything to decimal you are doomed.
const byte HOME = 0x02;
const byte CL = 0x10; // cursor left
const byte CR = 0x14; // cursor right
const byte SL = 0x18; // Shifts entire display left
const byte SR = 0x1c; // Shifts entire display right
Edit: Homework - (1) explain why this is so: The address of the MCP23016 is 0x20.
(2) explain how to change it.
(3) explain why you might want to do so.