It has to do with delays from the speaker and the headphone (stadium effect) so be sure to dive into the product manuals to see if what you have does this. Most don't.
To work around this we see if we can get an analog output from the TV or convert that optical to analog then split that to the bar and to the headphones.
I have a new TV-UE65KS9000 and Soundbar HW-J6500/1R. I want connect headphones so I can listen on both the TV and the headphones at the same time at different volumes. Q1) What are the best type of headphones to buy? Bluetooth? Analogue? Q2) How will I connect these headphones knowing that the TV or it's Connect Box or the Soundbar do not have any Audio analogue (e.g. 3mm socket) outputs

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic