You can add a cause which resulted in the closure or loss of a lead before archiving the lead. 

To create a new cause click on the More tab from the top menu and then go to Causes,

Click on Create Cause from the causes page,

Add details of the cause in the pop-up box and categorize it to a lead Won or a lead Lost,

Now whenever a lead is archived, you can select this cause to categorize the lead.