How to hide roles from user_profil_form while keeping value?
In my experience, unsetting the field works fine to disallow access to a field while keeping values on update. For example:

/**
 * Implements hook_form_alter.
 */
function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  if ($form_id == 'user_profile_form') {
    unset($form['account']['roles']);
  }
}