Yes, some differences are expected between the left and right panels; the right one displays the rendered markdown that you’ve written on the left one.
I see that adding your code as preformatted text broke and is displaying gibberish. I do not know why that might happen  I’ve never experienced any issues like that. My guess is that the code you’re pasting already includes some tags that might confuse the editor.