The media have selected this sentencing, which isn't all that unusual, & turned it into a sexual discrimination bit of news.
A judge has the discretion to impose a sentence that he / she considers is both appropriate & will deliver the best long-term outcome.
One sentencing option is to impose one that requires an addict to undertake treatment, quite often by being sent to an addiction centre in lieu of prison.
This applies equally to both male & female offenders so why the judge would pass those remarks, if indeed she did & hasn't hasn't been misquoted, is somewhat of a mystery.