Dreadful prosecution lawyer - one of the things a "careful" driver does is adapt their speed, positioning and observation to the environment, so if one of those pesky pedestrians does do something unexpected they can take avoiding action. A halfway decent prosecutor could easily have shot down what is a fairly vague and non specific defence, and I've seen that very defence screwed over first hand in court more than once.
I'm surprised as well he got not guilty on the licence and insurance charges, when so many other people caught riding simiarly modified e-bikes have been successfully fingered for it.
But hey ho. All it needs is an indifferent prosecutor, or one not especially well versed in the sphere of law at hand, and a mad/indifferent/gullible jury and stuff like this happens.