Is the sum of all FFT bins from Audacity equal to RMS amplitude? Say I open an audio segment with Audacity.  Then I perform a size 4096+ FFT with a rectangular window.  The program outputs bin magnitude values in dB.  If I add them all together like this:

sum = 10*log10(10(bin1/10) + 10(bin2/10) + 10(bin3/10)...).

I get a value very close to the file's calculated "total RMS amplitude".  (Or in this case, 3dB off since Audacity considers a full-scale square, instead of sine, to be 0dBFS).

Is this expected, a coincidence, or just an approximation?
This is expected and a consquence of Parseval's theorem.

Loosely speaking, it's a flavor of energy conservation: the total energy of the signal doesn't change when you transform it from the time domain into the frequency domain so the energy calculated in either domain must be the same.