iMac used for Target Display Mode runs really hot
I'm experiencing the same problem.  I have a current generation 5K iMac which I use as my main computer, and a 2009 iMac which I use as a second monitor using TDM.  In TDM mode, the older iMac runs painfully hot.  Switch back to regular mode, and that same iMac runs cool.

Typically, I don't even bother to login to the older iMac - I just turn it on and off with the power switch when I want to use it in TDM.  Hence, there can be no question about background apps running hot.