Can someone please tell me why kindlegen can't handle <pre>?

I have some html:

&lt;pre class="literal-block"&gt;
$ python

And kindlegen kindly gives me this?

  &lt;div align="left"&gt;
      &lt;br/&gt;$ python;br/&gt;

Calibre on the other hand seems a little more pleasant::

&lt;blockquote height="1em" width="0pt"&gt;
    &lt;br&gt;&lt;/br&gt;$ python;br&gt;&lt;/br&gt;

I thought well formed XML was a solved problem. The internet abounds with people claiming that one should only use kindlegen. The hacker in me sees a new rst translater, the realist in me cringes.