The docstring of id_for_label gives the explanation. See https://github.com/django/django/blob/main/django/forms/boundfield.py#L252
Wrapper around the field widget's `id_for_label` method.
Useful, for example, for focusing on this field regardless of whether
it has a single widget or a MultiWidget.
Then
Return the HTML ID attribute of this Widget for use by a <label>, given
the ID of the field. Return an empty string if no ID is available.
This hook is necessary because some widgets have multiple HTML
elements and, thus, multiple IDs. In that case, this method should
return an ID value that corresponds to the first ID in the widget's
tags.