Why does the homemade butter spoil so quickly?
It doesn’t. People have been doing this without refrigeration for a long time. The above poster did not wash off the buttermilk at the end which would cause it to spoil.
I'm not sure it does. It seems to last similarly to me when I make my own as long as I make sure to use sterilized containers to make it and such. It isn't as long as margarine which is maybe the comparison? Not sure.
It usually contains significant amounts of milk protein, which contribute to flavor but spoil about as quickly as milk does. Washing the butter thoroughly until well after the water is clear will improve storage time, as will salting the butter and thoroughly drying it.