In a home theater one of the most important functions of the AV receiver is to do the switching of sources. It makes for simple operation and making things easy is critical to a pleasant experience. You just plug the Blu-ray player, cable box, Apple TV, etc. into the AV receiver and run a single line to the TV. The TV just stays on one input making life less complicated.
With the advent of the sound bar the opposite is usually the way to go now. Most sound bars don't have many source inputs. There's just no room for them in their compact design. So now it makes sense to plug the source components into the TV and then run one line from the TV to the sound bar. Things get more complicated when the TV is to hang on a wall though. That's too many wires to run through the wall. Solving issues like this is what I do when I design a customer's system and each case is different.
Still, if the TV is simply sitting on a stand with the sound bar below and in front of it you may consider using the TV as the switcher. Matthew Moskovciak at CNET tells you how, Get more from your sound bar by using your TV as a switcher