Why is zeroing out a drive with dd not working?
The error makes sense, since it tries to write zeroes to the microSD card until it runs out of space.

You've misread the error.
gdd: error writing '/dev/rdisk2': Input/output error

That means there was an error writing to the device.  The command you issued should do what you want - fill the drive with zeros, but this error says otherwise.

What doesn't make sense to me is that as soon as the gdd process is done running, Disk Utility shows the SD card as &quot;boot&quot; again, it automounts at /Volumes/boot, and the files are still there. How is it that gdd shows that it successfully wrote the entire SD card full of zeros, and yet the data is still there?

gdd did no such thing!  It gave you an I/O error message when it was writing to the device.  Your original files are there because nothing was written to the SD card.
Possible causes:

The card could be write protected
The card could be defective (especially if counterfeit - i.e. it reports 16GB but only has 2GB of actual storage)
The USB card reader could be defective