More expensive is not necessarily better sounding. Just like cars and other products they are often designed for different purposes. Some place more value on features, some on better surround effects and others better sound quality. There is no one perfect sound bar no matter what the cost.
Of the two you are considering I'd say the Denon is better sounding with more connection options. The Sonos needs the sub in my opinion but is easier to use and set up, has more music services, a better app and better whole house integration. If you are going to be integrating these with a house music system the Sonos also goes over its own wireless network and doesn't compete with the bandwidth of your Wi-Fi. Normally, this is not an issue but if you plan on having multiple different streams you may have drop outs especially if other users are doing things like streaming Netflix, etc.