How important are classifications (ACM, AMS, PACS...)? For paper submission, I have recently spent some time struggling to find appropriate classification. The main question is: who needs this information and why?

At first I thought that they could be used by the editor to find an appropriate editor or referees, but I have had two experiences contradicting this hypothesis. In the first one, I was only asked to provide classification AFTER the review process. In the second, I was requested to point myself to appropriate editors and referees.

In my experience, I do not look at those numbers, and that is true for other colleagues. The only exception is when I am trying to find appropriate classification and look at other related papers for inspiration. In such occasion, I sometimes found classifications which did not seem to match the content of the paper. Apparently people do not care much for this. Another aspect of the question is: how bad is it to have a bad classification?
From the ACM page "How to use the Computing Classification System":


  An important aspect of preparing your paper for publication by ACM
  Press is to provide the proper indexing and retrieval information from
  the ACM Computing Classification System (CCS). This is beneficial to
  you because accurate categorization provides the reader with quick
  content reference, facilitating the search for related literature, as
  well as searches for your work in ACM’s Digital Library and on other
  online resources. It also ensures correct placement when a review
  appears in Computing Reviews.


There's similar verbiage for the AMS MSC. 

In other words, the institution needs it for their own databases and search mechanisms. The AMS probably needs it for something similar. So your use for the classification system depends on how much you expect people to search for your work using the classification structure provided by the institution. For math, I'd expect it to be used a lot: for CS, not so much.