Form API: Persistent values across submits?
In the Form API, there are two separate value setters #default_value and #value where these two make different things happen when you using it
- #default_value set the value of your element when the form is created the first time, and if your form has an error for some reason, does not affect your element
- #value set element value every time the form is rendered, even when the form is created again because of some error

It is not correct to use #value for textfields and other input elements, use #default_value instead. #value is meant only for buttons, submits and other non input elements.
if you use $form['#value'] = 'Name' for input elements like textfield the value of that field always would be Name even if the user entered some other value for this field.

see Form API Reference