the social psychology phenomenon is called "evaluation anticipation".
you are more activated when you are anticipating observation and evaluation by the observers.
part of your brain is processing what you look like doing the task, and generally you do the task with more overall activation.
long story short, you get better at very simple tasks (ie tying your shoe) and worse at complex tasks (like playing a complex piano piece on stage).