How ajax framework in D7 forms work? I am trying to understand and get the example working that was discussed here http://api.drupal.org/api/drupal/includes--ajax.inc/group/ajax

I understand the form building function.

function ajax_example_simplest($form, &amp;$form_state) {
    $form = array();
    $form['changethis'] = array(
    '#type' =&gt; 'select',
    '#options' =&gt; array(
      'one' =&gt; 'one',
      'two' =&gt; 'two',
      'three' =&gt; 'three',
    ),
    '#ajax' =&gt; array(
      'callback' =&gt; 'ajax_example_simplest_callback',
      'wrapper' =&gt; 'replace_textfield_div',
    ),
    );

    // This entire form element will be replaced with an updated value.
    $form['replace_textfield'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t("The default value will be changed"),
    '#description' =&gt; t("Say something about why you chose") . "'" .
    (!empty($form_state['values']['changethis'])
    ? $form_state['values']['changethis'] : t("Not changed yet")) . "'",
    '#prefix' =&gt; '&lt;div id="replace_textfield_div"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
    );
    return $form;
}


What I don't understand is what is happening in ajax callback function.

function ajax_example_simplest_callback($form, $form_state) {
    // The form has already been submitted and updated. We can return the replaced
    // item as it is.
    return $form['replace_textfield'];
}


The same form field is returned. I thought we can change the value or something for the form item $form['replace_textfield'] through ajax callback function. Can some one pls help me to explain this part?
All ajax logic placed in construct form function (ajax_example_simplest), ajax callback just return part of form (replace_textfield) or ajax commands. Its Drupal architecture. This form can be validate and altering.