The HDMI device will send the signal out to the connecting device, which in this case is your tv. Your tv is processing the sound and sending it out to your logitech system. It all depends what your tv is capable of in terms of audio processing. Based off your screenshot, it's dolby digital plus. You selecting optical out on your PS4 means nothing because you don't have the optical cabling coming out of your console to your logitech, your TV is doing the processing still.
Sounds like your TV is taking the HDMI audio source (as long as you're not bitstraming is PCM) and converting it to your logitech. Only reason I can think of why it's quieter when you select optical out, the full bandwidth isn't being sent to your TV, probably just stereo, and your TV is converting that out to your logitech.