People who struggle with hoarding have great difficulty and anxiety when it comes to ridding themselves of items. The manifestation of this can vary greatly, but the common thread to this being a mental illness is that the hoarder experiences negative effects on quality of life, excessive stress or anxiety, and/or health concerns, because of the hoarding behavior.
Hoarding tends to develop in response to significant loss and/or trauma. In these cases people may not be able to cope with such hardships in healthy ways, so they comfort themselves/cope through attachment to objects. In many ways hoarding can function similarly to security blankets for children. The person is unable to cope with a loss or trauma, so they attach to things for security and/or to keep themselves from experiencing unpleasant emotions.