The advantage of this is it makes writing intermediaries (e.g. proxies) easier - they don't have to understand the whole protocol, they can just look at the length prefixes to know when a message is complete, the disadvantage is that it introduces latency and increases memory usage