My father was killed in a plane crash just before the end of WWII and oddly, I have never heard this expression relating to his death.

I have heard it in another context, however: when someone has been "taken" for all they're worth, they are said to have "bought the farm".

Has anyone else heard it in this context?