If a block returns a renderable array and the array has direct attibutes they will be "stolen" from the original content and applied to the block itself.
For example a if a block returns something like this:
array( '#attributes' => array( 'class' => array( 'foo-bar' ), 'data-test' => 'This is just a test' ), '#markup' => 'This is block content' );
The rendered HTML will be:
<div id="block-foobartest" class="foo-bar" data-test="This is just a test"> This is block content. </div>
<div id="block-foobartest"> <div class="content foo-bar" data-test="This is just a test"> This is block content. </div> </div>
This is especially bad for blocks that represent forms since none of the form attributes is preserved.