A browser's developer console does not show you the actual source of the page (use "view source" for that): it shows you the browser's interpretation of the page content, as modified by javascript (it'll also show the browser's best guess fix for invalid HTML).
If you're outputting XHTML without XHTML headers, browsers will just interpret it as slightly weird HTML, interpret it accordingly, and show that interpretation in their developer consoles.
- If you want to see the actual XHTML source of the page, use the "view source" option.
- If you want to see XHTML in the developer console, ensure you're outputting the header
Content-Type: application/xhtml+xml
.