Mike Schramm of TUAW on OS X Lion’s Automatic Termination:
The culprit is a new “feature” in Lion called Automatic Termination, which will shut down and quit any (compatible) apps that aren’t active and don’t have any visible windows. Of course, most official Apple apps support Automatic Termination.
I have heard other people talk about this, but I still haven’t witnessed it myself. I am not exactly sure how it gets triggered. I can tell you that I have left TextEdit open for days at a time without using it and it hasn’t closed.