All GP practices in England are legally required to share data with NHS Digital for this purpose under the Health and Social Care Act 2012 (2012 Act).
More information about this requirement is contained in the data provision notice issued by NHS Digital to GP practices.
You have the choice to opt out if you wish to. You need to complete register your type 1 opt-out preference form online to do so.
You can learn more about how NHS Digital uses your data here: General Practice Data for Planning and Research: GP Practice Privacy Notice – NHS Digital.