'dogs don't operate within human moral boundaries' is exactly the point here, a human has a complex thought process when carrying out any task, 'attackers' DO have moral boundaries, they just choose to ignore them, they know exactly what there actions will do to someone and how it will make them feel and they do it regardless.
A dog has NO moral boundaries and a very limited 'thought' process and responds instinctively, it looks to you as it's owner to see how to react from there but nothing will stop that first instinct to warn and protect from kicking in, it's a defence mechanism that serves them well. The dog is saying 'I don't know who you are or if you'll hurt me so don't come any closer' but it communicates that by claiming its territory and barking. To the people saying it's a pre-curser to an attack, it's a load of bollocks, if the dog wanted to attack the cleaner it would have done, it didn't.
Holding dogs to human standards of behaviour and likening it to a person running at you with a knife is quite frankly, ridiculous.
Meanwhile, dogs ARE trained to operate within certain boundaries
I would argue that OPs dog operated within those boundaries, it didn't launch itself at her in a feeding frenzy like some of you are suggesting.
the only difference was it took two commands to recall it, without further info it's hard to know why, it may have still felt threatened, or the 'intruder' may have come further into the garden when the dog retreated the first time, hard to say.
If the cleaner had been seriously injured, the dog owners on here, like myself, would be responding entirely differently to this thread I'm sure, any dog that would attack a person who accidentally stumbles upon it should not be alive IMO, at a bare minimum they should be behind a LOCKED gate, so OP would be held to a higher standard, a dog running up to an unexpected intruder and barking at them is just natural dog behaviour, it's unfortunate that the cleaner was scared by it, but they really shouldn't have done what they did, I'd have been livid over the intrusion of privacy, whether my dogs barked at them or not!