WikiText is NOT the same as HTML web pages. There is no standards body to define what constitutes valid WikiText formatting.
If you want to see the "native" WikiText for a page, start to edit the page, and click on the "Wikitext" button on the menu bar. To see the "native" editor for Mediawiki, click on the "Disable rich editor" above the edit area.
The WYSIWYG editor converts WikiText to HTML for display and then back to WikiText to save the page. The result is sometimes not what you expect to see on screen.
The software you are using was developed by and is supported by volunteers and programmers who contribute their time and expertise. There may be bugs in the software. If you find a problem, fix it and move on.