Recently discussed this behaviour in Sydney, remember it was particularly bad around Surry hills
You can't blame them, it really is damn infuriating when nothing is coming. Same applies as a driver, if I could have back all the time I've waited for lights to change I reckon I'd be years younger. Sydney's traffic light system is brain-dead.
Incidentally, years ago I was at a trade launch by a well known company and I found myself sitting next to a person who was one of the programmers for the traffic light system and I made the mistake of mentioning how bad the system was. Wow, he nearly took my head off, it was such as sensitive subject. He then proceeded to lecture me about how difficult the problem was and how good the local effort was compared with many other comparable cities.
One time I was crossing the street with my wife near Town Hall against a red pedestrian light and I was smiling because of the conversation. We were walking toward two uniformed NSW Police officers whom I failed to notice as I was looking out for traffic when crossing the street. One of them, in her twenties, snapped at me like I was a naughty child (I'm around 50) with "you have the nerve to smile while illegally crossing? I could fine you you know". I didn't want a fine so stopped smiling and apologised and continued on my way.
That said occasionally there is a coordinated session where they hang out at specific intersections waiting to fine people but they don't try to hide themselves (usually there's a parked police motorcycle on one corner of the intersection, etc.)