How do I dynamically fill a textfield with #ajax?
After messing with this for a while, I discovered that I needed to unset the textfield. Once I did this default_value started to work with ajax, below is the final code I had.

unset($form_state['input']['profile_name']);

$form['profiles'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; 'Profiles',
    '#options' =&gt; $profiles,
    '#ajax' =&gt; array(
        'callback' =&gt; 'profile_callback',
        'wrapper' =&gt; 'profile-wrapper',
    ),
);

$profile = isset($form_state['values']['profiles']) ? _get_profile_info($form_state['values']['profiles']) : NULL;

$form['profile_name'] = array(
    '#type' =&gt; 'textfield',
    '#prefix' =&gt; '&lt;div id="profile-wrapper"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
    '#title' =&gt; 'Profile Name',
    '#default_value' =&gt; $profile == NULL ? '' : $profile[0]-&gt;{'name'},
);