That's a Java console output.
Going to be a CAS. The left terms are an output of the internal representation of the terms, thus all the unnecessary brackets. The right one is supposed to be the final output for the user. For some reason it still shows some unnecessary brackets, theoretically they should be gone, but at least it doesn't leave out any necessary brackets.
Sorting the addends is not yet really implemented, there is just a stub function that at least uses an unambiguous sorting method, so equivalent terms should be the same.