The Wall Street Journal lays out the reasoning as to why the FBI raid was illegal.
The Presidential Record Act (PRA) of 1978 (Link) grants former presidents complete access to all records created under their admin.
"The PRA explicitly guarantees a former president continuing access to his papers. Those papers must ultimately be made public, but in the meantimeāunlike with all other government documents, which are available 24/7 to currently serving executive-branch officialsāthe PRA establishes restrictions on access to a former presidentās records, including a five-year restriction on access applicable to everyone (including the sitting president, absent a showing of need), which can be extended until the records have been properly reviewed and processed. Before leaving office, a president can restrict access to certain materials for up to 12 years.
The only exceptions are for National Archives personnel working on the materials, judicial process, the incumbent president and Congress (in cases of established need) and the former president himself. PRA section 2205(3) specifically commands that āthe Presidential records of a former President shall be available to such former President or the former Presidentās designated representative,ā regardless of any of these restrictions.
Nothing in the PRA suggests that the former presidentās physical custody of his records can be considered unlawful under the statutes on which the Mar-a-Lago warrant is based. Yet the statuteās text makes clear that Congress considered how certain criminal-law provisions would interact with the PRA: It provides that the archivist is not to make materials available to the former presidentās designated representative āif that individual has been convicted of a crime relating to the review, retention, removal, or destruction of records of the Archives.ā
In making a former presidentās records available to him, the PRA doesnāt distinguish between materials that are and arenāt classified."
A former presidentās rights under the Presidential Records Act trump the statutes the FBI cited to justify the Mar-a-Lago raid.
www.wsj.com