All publishers have a legal obligation to provide at least one copy of each of their publications to the Legal Deposit Office of the British Library. This obligation includes all books and periodicals which are published or made available in the United Kingdom, but excludes internal reports, examination papers, local transport timetables, appointment diaries, wall and desk calendars, and posters, unless the British Library makes a written demand for the material: in which case, the publisher is legally obliged to supply those requested copies.
Up to five further copies may be requested by the The Agency for the Legal Deposit Libraries, which coordinates such requests on behalf of the five other Libraries which take part in the scheme: the Bodleian Library, Oxford; Cambridge University Library; the National Library of Scotland; the Library of Trinity College Dublin; and the National Library of Wales. If these copies are requested then once more, the publisher has a legal obligation to provide them.
These copies must be supplied at the publishers' cost within one month of publication. Their details are then added to the searchable integrated online catalogue which the British Library maintains, and this huge resource is available for inspection at the British Library. If they are not supplied then the Legal Deposit Office will demand a copy of the publication in order to maintain the UK’s national archive, which has been established for over four centuries. Consequently, it knows what it's doing: so when it tells me (as it did just last week) that it's the publisher which is obliged to supply these copies, and not the writer, I have every reason to believe it.