The offence exists.
He allegedly committed it.
They charged him for it.
What more do you need to know? Why they never charged him for it before?
I would guess it's because, before, he didn't unearth an address that was known to the authorities and not released to the general public, dress up in uniform, go to that address and harass the occupants at that address, rather than let the appropriate legal agencies handle it.
Once he did that, they threw the book at him and charged him with everything they possibly could - including the uniform offence.