There are two issues here.
2. The atto editor relies on the browser for a lot of the editing functionality. So exactly how it creates / removes tags etc. as you bold / unbold text etc. depends somewhat on the browser you are using. I currently find Firefox to maintain the "cleanest" html "under the hood". I would recommend using it for Moodle editing, but this is only IMHO and you take this advice at your own risk. Also, browser versions change rapidly and the best browser for editing in Moodle may change in the near future.
Best wishes, Theo