I am planning on using the MCP23S17 port expander for my use case but upon wiring them up , it would seem that the MCP23S17 which is the SPI version of the port expander has address pins which is weird. The SPI protocol does not need addresses but instead rely on the Chip Select pin. What is this for ?
Look at the MCP23017/MCP23S17 datasheet.
As you rightly say the SPI protocol does not use those address bits, it uses chip select to address the device.
However the command set used by the device does use the address bits. The SPI control byte for the MCP23S17 uses those bits to select the device.
That allows you to have multiple MCP23S17 with one chip select but still be able to choose between them.