Why does my automasjons have two names?

As I can see there is two places to change the name of the automation.
IT looks like you can change the name of “the entity of the automation”, or you can change “the name of the automation inside the automation”. When changing one of them, it is not changing in the other one, not even after reboot.

I find it a little confusing with two “name” fields.
Why is it like this, and in what places are which used?

The top one, customising, is the over-ride used by the UI for the name. That doesn’t change the automation, it just tells HA that entity automation.leaving_home has an effective friendly name of Forlater hjemmet.

Names are purely used in the UI for humans, they’re meaningless to the system.