This is happening in the 2013 WP theme, but would likely happen in other themes as well.
Since the editor is using pre and code tags, the theme CSS is affecting how it looks. Best would probably be to best to have a custom CSS sheet loaded editor side to override anything the theme might be doing.