The lessons are as equally important to parties as they are to the attorneys and as applicable to non-jury trials as jury trials. Not only do you embarrass and distract your attorney, (almost always at the worst possible moment) but you may inadvertently tick off the very folks who are going to decide how bad your pain is going to be, if any.
Remember, your isn’t the only case the judge is going to hear – he’s probably got a busy backlog. Disturbing the decorum of his courtroom is going to really piss him/her off.
As for the jury – they are bored! They don’t want to listen to your shit, they want to be someplace else having a good time. Sighing and clucking your teeth, or engaging in other distracting behavior, only convinces them you’re an asshole who is responsible for them being there and they will react accordingly.