Seems to me it's bad practice to combine the text you want to show with the formatting (escape codes) in string literals. Everything is then immediately dependent on specific type of UI technology (terminal).
echo "${esc_red}ERROR${esc_reset}: All messed up"That's why I think they have these strings in the code.
It's clearly harmful to write escape codes in string literals. They are not readable.
The escape code to change any text to red should appear in code exactly once.
This is analogous to HTML inline styles.