SPI reading from slave
SPI is a full-duplex protocol.  In order to receive data, you have to send data at the same time, even though the Flash chip might do nothing with the data that you send.

So, for example, you want to read the JEDEC ID.  You lower the /CS signal and send the "read JEDEC ID" command.  That command instructs the Flash chip to "send your JEDEC ID and do nothing with any other data that you receive".  You keep sending data (which is all zeroes and will be ignored anyway), and as you do so it sends you back its JEDEC ID - you get back one byte of JEDEC ID for each zero byte that you send.  When you raise /CS at the end of the transaction, that resets the Flash chip's controller.