It's simply an example of a judge stating the bleedin' obvious.
Statement 1:
"If you leave your car unlocked, with the keys in the ignition, you greatly increase the chances of having it stolen".
That statement doesn't justify car theft; it simply points out the risks of certain behaviour.
Statement 2:
"If you walk through a dodgy part of south London, late at night, conspicuously using an iPhone 7, while openly counting the large amount of cash you're carrying, you greatly increase the chances of being mugged"
That statement doesn't justify mugging; once again, it simply points out the risks of certain behaviour.
Statement 3:
"If you wear sexually provocative clothing, get totally drunk and then try to walk home alone through dark alleyways and across equally dark parkland, you greatly increase the chances of being raped"
That statement doesn't justify rape. It's roughly what the judge said though and, as above, is simply stressing the risks that come with certain behaviour.