The original English sense of "self-justification" yielded a meaning "frank expression of regret for wrong done," first recorded 1590s, but this was not the main sense until 18c. The old sense tends to emerge in Latin form apologia (first attested in English 1784), especially since J.H. Newman's "Apologia pro Vita Sua" (1864).