Zend certified PHP/Magento developer

Why does Magento docs show manipulating layout though plugin rather than module layout XML file

The docs https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout_new_field.html they describe adding a new field to the checkout form. The first step is to get the field onto the form and they do this using a plugin for the checkout block’s layout processor.

Instead of manipulating the layout object directly in memory via a plugin, why isn’t this field just added via an XML layout update? I’ve tried this method and it works.

The only reason I can think is that the code snippet in the documentation would be much less clear with the XML node which would need to surround the relevant part.