Document Generation Is Backend Infrastructure

Why document generation deserves to be treated as backend infrastructure, and when a Java project actually needs a document engine.