This happens because when an IT person is there the user actually reads and pays attention to the error message, often types more slowly (thus correctly), and generally just tries to do the task methodically.
At least 60% of โcomputerโ problems are really user issues, so when the user actually starts to pay attention, mysteriously the problem solves itself.