Why not justified
In a book, justification works because the typesetter or the software places hyphens and balances spacing across the
whole paragraph. In a browser hyphenation is off by default (hyphens: manual), and long words — “configuration”,
“authentication” — move to the next line whole. The spaces left on the line stretch several times over, and vertical
white streaks form across lines.
On a phone it’s worse: a line holds 35 characters, and one long word leaves three words on a line with huge gaps. WCAG 1.4.8 (AAA) lists this among its conditions for blocks of text: no justification.
Why not centered
Centered lines have a ragged left edge — every line starts in a new place, and the eye looks for the start again. For a one- or two-line heading that’s unnoticeable; for a paragraph it isn’t.
If you do need justification
text-align: justify together with hyphens: auto and a lang attribute on the page: the browser hyphenates by
dictionary, and the spaces stretch less. Chrome, Firefox and Safari all ship an English hyphenation dictionary.
The price is frequent hyphens, and they can only be controlled per element as a whole: code gets hyphens: none.
For a website the gain is one even right edge.