Quick Read: Using live coding to bring coding to life
A learner's first experience of a solution to a programming problem may in fact be the final program, polished, complete and error free.
They don't see the decisions, mistakes, testing and refactoring that has been involved in getting to that point.
Live coding is one approach to exposing learners to the process of programming, through which they can see (or be involved in) decisions being made, support the correcting of errors and even steer the direction of development. The practice helps reduce learner cognitive load, instil good programming practices as well as signalling that making mistakes is a common (if not crucial) part of programming.