There is no suggestion that the defendant has necessarily acted wrongfully, nor that he should be compensated for the total amount of his loss. Rather we are looking at a judicial solution to problems where loss must be distributed, and no disgorgeable benefit is being conferred.
Source: wiktionary