What would be the advantage of bookshelf vs on wall vs speaker bar?
Bookshelf - no compromise except for bass which is really not a significant concern IMHO.
On Wall - Usually only 4" deep speaker box, so Woofer depth is constrained to about 3", and limited cabinet volume for bass resonance/porting is another compromise. Nonetheless, I have heard some very good on wall speakers (these are not huge compromises). Additionally, you cannot play with toe in.
Speaker Bar - The same compromises of On Wall plus the compromise due to width of bar. Usually around 40" is near the longest, which means footsteps that should come from the right of your TV (off-screen) will be solidly located inside of today's larger screens. If you are sitting back 10', 40" means only 16 degrees from the left to the right.
Another compromise of the Sound Bar is design/marketing assumptions associated with soundbars.
For example, here is a higher level ($1600) Yamaha which uses a total of 46 speakers to emulate a 7.1.2 system (with Atmos). It may not sound
too horrible, but I would by far prefer a pair of decent book shelf speakers in stereo than buying that all of these drivers in the same box will give me 7.1.2 surround sound! Not to mention the
4.5" Subwoofers!!!
Almost all sound bars offer some types of gimmicks to try and pretend it has legit sound quality!
http://www.crutchfield.com/p_022YSP5600/Yamaha-YSP-5600-Digital-Sound-Projector.html