esc_attr() on hard coded string

All text entered into the database is, in essence, “user entered”. If the site gets hacked a hacker could change every instance of the field “title” to contain javascript, for example. If you just echo out the field then you’re writing the javascript to the page and thus injecting the code into the page.

Therefore, you should consider everything that comes from the database to be potentially hackable and use the appropriate esc_ function before writing it out.