When dealing with a company, Companies House provides a wealth of information about them. As a software developer, most important in this regard are things like their company number, which serves as the best immutable identifier unless they have an LEI. Additionally, using this company as an example (which I have authorisation to do) I can see the registered address and its nature of business.
This means that acquiring useful information about programmatically about companies in the UK in a consistent manner is a relatively trivial endeavour.
However, this does not apply to UK Government departments, ministries, and offices. I once asked the Home Office via an FOIR whether it or its subsidiaries had been assigned an LEI, but as this response demonstrates, they were not aware of any, if they have been. Consequently, any digital system interacting with these government entities must instead rely upon manual oversight to ensure that the data held for these is correct.
As an example, HM Armed Forces may be referred to as their entire name – His Majesty's Armed Forces or Her Majesty's Armed Forces, because the name changes based upon who is regent, yet the organisation referenced remains the same. I know not of any other organisation which consistently changes its name based upon certain societal triggers, which means I need special logic for solely this organisation's name. This wouldn't be a problem if I could reference it using a company number or LEI.
As this comment on an FOIR request of a similar nature, conducted by someone suffering from the delusion that they are a sovereign citizen demonstrates, it is explained that government entities like councils sometimes incorporate themselves or subsidiaries as companies for "administrative purposes", although this appears to be much the exception rather than the norm.
Summarily, why is this so – why are UK Government departments, which appear to be organisations like any other, not incorporated as charities or companies with either commission? I can't see any benefit to it.