Difference between $form_id and $form['#id']? What's the difference between $form_id and $form['#id'] in hook_form_alter() ? Why they have not the same values?
Next should make sense:

&lt;form action="somepath" id="search-theme-form"&gt; &lt;!-- id = $form['#id'] --&gt;
  &lt;input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form"/&gt; &lt;!-- value = $form_id --&gt;
&lt;/form&gt;


Terms:

#form['#id'] = store html form attribute id:


  Used to populate form elements' id property. In rare cases,
  you can set this value yourself on a form element, to override the
  default setting.



$form_id - point to Drupal form function name, in html it's form hidden element:


  The unique string identifying the desired form. If a function with
  that name exists, it is called to build the form array.