There's no firm rule on the subject. One opinion from the Los Angeles Bar Association says an attorney in a criminal case should retain the client's file as long as the client is alive.
However, you're in a somewhat different position. The file in a case belongs to the client, and your attorney asked you if you wanted yours when the case was over. Since you turned down the offer, the lawyer was probably justified in destroying it.
Please understand that this is a general discussion of legal principles by a California lawyer and does not create an attorney/client relationship. It's impossible to give detailed, accurate advice based on a few sentences on a website (and you shouldn't provide too much specific information about your legal matter on a public forum like this site, anyway). You should always seek advice from an attorney licensed in your jurisdiction who can give you an informed opinion after reviewing all of the relevant information.
I think th rule is "reasonableness." A will file of a living person should be retained until needed. I believe records of ongoing clients and/or businesses should be retained indefinitely. I have been practicing 40 years ans I kept all my files and only rarelt needed them. In 2002 I had a need to move my office; I sought advice from colleagur on what was precisely your question. The general ideawas retention for between five and seven years. Your problem is that you told your lawyer that you didn't wantthe file and the case was closed. The lawyer probably could demonstrate there was no need for retention. Many lawyersm however, keep old files at offsite storage areas.
This is not personal legal advice, but rather an answer to a hypothetical question from someone I don't know.