VS1053B Audio Codec and MP3 Question
What is the purpose of this VS1053b chip if we are just playing a file from an SD card?


MP3 is a compressed audio format. The file stored does not contain "raw" audio data (which would typically be some for of pulse-code modulation (PCM), but rather it contains a stream of data that must be decoded to obtain the actual audio data.

Hence, you need a decoder chip, because an Arduino (presumably, I'm not actually sure) does not have enough horsepower to do the decoding by itself. The decoding process involves many inverse frequency transforms and must happen in realtime; an MP3 stream contains blocks of frequency/amplitude information, and this must be converted back to the discrete time domain. If you had uncompressed audio data in a friendly format (WAV, for example, which stores LPCM-encoded audio and is trivial to decode), you would not need a complex decoder (but then the file would be much larger).


  When we send hex values (samples of an MP3 file) from the SD card to VS1053b over SPI, is it processing those samples to recover the unencoded data (basically decoding)? If so, is this for better quality since we get rid of some data from file during MP3 encoding?


I highly suggest reading at least the beginning of the VS1053b datasheet, as well as the above link to MP3.

The MP3 file does not have raw samples, but sort of yes to the first question: the data is read from the SD card in blocks and the VS1053b decodes the incoming stream (by doing a lot of math), recovers (mostly) the original audio data, then sends this to an internal DAC and produces an analog voltage. (Remember that MP3 is a lossy codec, and therefore the output data sent to the DAC does not exactly match the input data that was originally encoded).

Quality doesn't really come into the picture, it's not for "better quality" because you have to decode the data. You can't just pass the data from the SD card to a regular DAC, because that data doesn't represent audio data in a way that the DAC can understand.


  Are these chips more meaningful if we, for example, record our voice with a microphone and let VS1053b encode that recording so we can take data over SPI and save it as an MP3 file?


Well, they're "meaningful" because you need them to decoded MP3 files with such a limited processor (ATmega328). The VS1053b is an encoder, but not an MP3 encoder: it can encode IMA ADPCM and Ogg Vorbis. So, no, it can't record audio to an MP3 file, but it can record audio to other formats.

Hope that helps. To better understand MP3 compression, you'll want some background in time-frequency analysis and frequency domain operations (and I'm not sure how much of a background you've got).