When I see an attachment in a content list, or even in that attachment's icon editor field, the icon it shows is actually the image that was uploaded as the attachment.
I'm guessing that you mean the icon next to the title on the attachment's "page" view. I see that the code there specifically strips out the "custom" CSS class from this one instance, possibly because it results in the same image appearing twice in this view (once next to the title + once in the body). However, this does not appear to be documented in the original tech outline of the icon feature, nor in any follow-up posts, so I am inclined to treat this as a consistency bug and add an admin option, where the default value is actually the behavior you want.