Why does Apple TV not stop my Mac from sleeping? When using Home Sharing on Apple TV 3rd gen, the Mac will fall asleep even though it is needed to stream content. So in the middle of a movie the connection will be lost because the Mac goes to sleep.

Why does it not stay awake? It seems like a big oversight on Apple's part.
You might want to try going to 


System Preferences
Energy Saver
Then set Display Sleep to never


If you find the need to put the display to sleep because you want to have the computer on and running for whatever reason then I would suggest going to the Screen Saver options and enabling Hot Corners. In that screen you can make the display go to sleep or trigger a screen saver by moving the mouse cursor to a corner on your screen.

Source: That is my current setup. No Display Sleep on unless I'm running a lengthy Time Machine Backup overnight.