You may have a pref setting to shut down inactive applications after a specific time lapse e.g. 60 minutes.
From the dock click on the icon for System Preferences
Then go to Security & Privacy
If there's a closed padlock icon (lower left) click it and enter your Apple password.
Click the Advanced button and, in the dialog that opens, if the logout time is checked, uncheck the box marked
Log out after 60 minutes of inactivity.
If that’s not the case then it may only affect non-Apple applications. After using LR I always use Cmd+Q and then hit backup or skip. LR is only backing up the small catalog .lrcat file (not the images) so I find it a good habit to get into. In fact I always quit all applications (with the exception of Finder) and shut the lid.
Wow -- that was hidden! Thanks so much! It was set to 25 minutes and I unchecked it. I guess Yosemite came that way -- I've never had the issue before.
When I have a few minutes, I always answer the prompt to let LR backup the catalog when I quit it, but I don't want it to try to quit when I'm away from the computer for a while during the day and it goes to sleep. (My catalog file isn't so small, with over 120,000 images cataloged, so even on a fast computer and a SSD it takes a while. And I do a LOT of deleting.)
But Lightroom is absolutely something I couldn't live without! I LOVE it!