I know this post is old, but it is a frustrating problem that took me a few attempts to figure out. I had the same problem occur this past month after years of things working just fine. Both my TV and sound bar are Samsung products. Hopefully, someone down the line will benefit from this info.
Samsung sound bars are equipped with a feature called Auto Link. This feature allows you to control the sound bar, including powering it on, with your TV remote (or Apple Remote, provided you have the other settings correct in tvOS) with just an optical cable connected between the TV and sound bar. How you activate Auto Link depends on the model of sound bar you have, but I think every Samsung sound bar made in the last 15 years has this feature.
I inadvertently disabled the Auto Link feature after my Apple Remote mysteriously stopped working and I started messing with the settings on the sound bar.