Having a trial by jury can be helpful to a defendant if they are the sort of person who can appeal to a jury -- if they look nice or if they have a sad story, things like that.
If you are a person like this, you can hope that the members of the jury will have sympathy for you. You can hope that they just like you when they look at you. Or you can hope that they will feel sorry for you and understand that your life has been tough.
A judge might be a lot more harsh. The judge would have seen lots of criminals come and go and would be way more cynical and less forgiving. In such circumstances, you'd want a jury trial because you might hope you'd be more likely to be acquitted or, at worst, to get a lighter sentence.