This is not a bug, this is the way CSS works, and there's nothing we can do to change it except advise you on how to accomplish what you want. Headline tags are block-level elements and they fill up the entire width of the containing element, including the border (unless the headline has a specific defined width).
Wrap the table in a DIV tag. Apply the float to the div, some padding, and give the div a background color that matches your article background. If you don't need any padding, you can just apply a background color to the table itself.