Can someone please explain the advantage of using a tokenized
stream protocol (so packets are deliminated by say newline).

The only one I can think of is platform independence.

A major drawback seems to be security concerns.

Why, oh why, resort to such a method instead of prepending the
packet size?

Is it just lazy *** programmers?