Of course, making money illegally does not necessarily mean it was stolen. It might also be counterfeited, drug money, protection money, blackmail money etc... The point being, it is not money they are legally entitled to.
Who, then, is legally entitled to the money? If it is counterfeited, nobody. If it has been gained from others through nefarious means, then it should go back to whom it was illegally taken from.
Of course, the problem is the word 'steal'; defined as taking without permission or legal right without intending to return it. But what if one takes back the money from criminals and returns it to it's original owners, or, to the police; would that then mean two wrongs just made a right. Robin hood operated along the same lines.
What if you should take back (steal) the money from the crims' and hand it in to the police, but, the police can't find the original owner and so return it to you (unlikely but possible)... should you then return it to the criminals? I think not.