It is truly remarkably dumb that he did this at work, and not even in an office or other private space.
If he did this at home, even selling it to a reasonable circle of people he knew, it would be hard to get caught. What he did made getting caught, and losing his job, inevitable.