Oh oh! I learned recently where that phrase originated! Some of my details are sketchy but back in the wars (cant remember which one) if a dude died while enlisted any monies owing to him (retirement etc) were given to his family instead and usually the family would "buy the farm" with that money. So by dying the man literally bought the farm.