The second example doesn't work because there are no spaces between words (as elements in the inline formatting context cause spaces from carriage returns and HTML space) so there is no space to justify.
From the 2.1 Spec:
In the case of 'justify', this property specifies that the inline-level boxes are to be made flush with both sides of the line box if possible, by expanding or contracting the contents of inline boxes, else aligned as for the initial value. (See also 'letter-spacing' and 'word-spacing'.)