Problem/Motivation
ConfirmFormInterface::getFormName() is only called by ConfirmFormBase. The return value, a string, is used to build a hidden form element:
$form[$this->getFormName()] = ['#type' => 'hidden', '#value' => 1];
The form value is not used by ConfirmFormBase's submit handler, although one subclass in core, UserMultipleCancelConfirm does check it.
However, because this form element uses the #value property, its value will ALWAYS be 1 according to the docs for Drupal\Core\Render\Element\Hidden:
* - #value: The value of the form element. The Form API ensures that this
* value remains unchanged by the browser.
Therefore, AFAICT it doesn't serve any purpose and both the element and the ConfirmFormInterface::getFormName() could be removed.