standalone v1.0 provides a fix for this issue.
Now the new
crop option (based on TeX boxes and page resizing) will be used by default and ignore paragraph break. Also have a look at the new
varwidth option which allows for paragraphs with variable widths. An example can be seen in standalone figure and tabular.
Previous versions of
standalone class used the
preview package to generate a tight page. That package sets the size of the page to the size of the content box plus some border.
In your code you have a trailing empty line which causes an implicit
\par, i.e. a paragraph, turning the whole thing into paragraph box with the given
\linewidth. I, as the
standalone author, tried to find a way to fix this, e.g. using my question Avoid paragraph due to trailing empty line in standalone file, but so far I didn't put anything into the class.
As a workaround simply do not have trailing empty lines. Leading lines might be OK, but it is better to avoid them too. Future versions of
standalone will handle this better. Maybe I will provide multiple ways to clip the whitespace off or an option to use