That's because echo
isn't piping at all--it's interpreting the output of ps ax
as a variable, and (unquoted) variables in bash essentially compress whitespace--including newlines.
If you want to pipe the output of ps
, then pipe it:
ps ax | ... (some other program)