What does parent::form($form, $form_state) do? I'm not able to understand what parent::form($form, $form_state) does in a content entity form. If I comment it out, the entity form still get rendered.

class AdvertiserForm extends ContentEntityForm {
  /**
   * {@inheritdoc}
   */
  public function form(array $form, FormStateInterface $form_state) {
    $form = parent::form($form, $form_state);
    /** @var \Drupal\redirect\Entity\Redirect $redirect */
    $advertiser = $this-&gt;entity;
    $form['status_code'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Redirect status'),

    );

    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function validateForm(array &amp;$form, FormStateInterface $form_state) {
      $form = parent::form($form, $form_state);

  }

  /**
   * {@inheritdoc}
   */
  public function save(array $form, FormStateInterface $form_state) {
    $this-&gt;entity-&gt;save();
    drupal_set_message(t('The redirect has been saved.'));

  }
}


What does parent::form($form, $form_state) do, exactly?
If you look at ContentEntityForm::form(), the method called with parent::form() since ContentEntityForm is the parent class, you will notice what exactly it is doing.

  $form = parent::form($form, $form_state);
  // Content entity forms do not use the parent's #after_build callback
  // because they only need to rebuild the entity in the validation and the
  // submit handler because Field API uses its own #after_build callback for
  // its widgets.
  unset($form['#after_build']);

  $this-&gt;getFormDisplay($form_state)-&gt;buildForm($this-&gt;entity, $form, $form_state);
  // Allow modules to act before and after form language is updated.
  $form['#entity_builders']['update_form_langcode'] = [$this, 'updateFormLangcode'];
  return $form;


It doesn't significantly change the form, so it is expected the form doesn't apparently change, or it is rendered the same if you don't call parent::form(), but (as the comment says), it allows modules to act when the form language is updated. You could not see anything different, but you are actually avoiding modules can do anything when the form language is changed.