Well lets just put it this way: if compulsive criminals actually could control their compulsions they wouldn't be compulsive criminals. It was not like as if he was accused of just a singular one-time offence.
Besides, I've not read any actual official statement that said images he was in possession of were illegal. The closest I've seen is this:
https://www.nytimes.com/2019/07/08/nyregion/jeffrey-epstein-charges.html
If the illegality of the images were obvious i would expect them to state that instead of merely making the allegation that they were proof of his "predatory attitude". Hell if possessing such images was evidence of being a sexual predator then just about everyone who has visited a online porn website would qualify as sexual predator, considering there's no shortage of images and videos of "teens".
It could very well be that said images are perfectly legal, regardless of what the prosecutor is seemingly implying.