Let me give you a few examples where such actions would be warranted even from a moral standpoint of an observer. Perhaps it could spur you to further assist me in this inquiry.
In the situation of a demonstrator being handcuffed and taken into custody for disorderly conduct, a general sticker used by some police forces around the world and applied on people who they seek to disperse or discourage from further actions.
In an effort to damage this section of the state and its ability to classify and monitor the activities of the group it would thus be in the interests of those individuals “caught” to not submit to giving out their names. Obviously they would never carry their IDs when demonstrating.
Other examples would be hikers or travelers, vagabonds. People seeking to live in harmony with nature, hunting and fishing and being harassed for doing such merely because they lack the funds to buy the licenses or land required.
In general it could be of the interest of someone wishing to travel incognito who is arrested for trespassing or vagrancy to refuse to identify themselves. There are many reasons for which to travel incognito which include both good and bad. The good are for example flight from persecution, abusive parents, added life experience, meeting people who are not affected by your status or wealth, etc.
I can think of a couple of more situations but I think that with the ones mentioned previously this should suffice.