In my instance of Confluence, I have a simple user macro that wraps whatever is inserted into it in a div. When I put a title and a paragraph into the content of the macro, the title is completely removed and the paragraph is stripped. However, if I include a second paragraph, then all of the content is rendered correctly.
Here is the macro:
## Macro title: DIV
## Macro has a body: Y
## Body processing: Rendered
## Output: HTML
## @param Class:title=Class|type=string|required=false|option-showNameInPlaceholder=false|option-showValueInPlaceholder=true
## @param Style:title=Style|type=string|required=false|option-showNameInPlaceholder=false|option-showValueInPlaceholder=true
<div class="$paramClass" style="$paramStyle">$body</div>
Here is the content that I am putting into the macro:

However, when the page is saved, the output removes the title and flattens the paragraph, leaving this:

In terms of HTML, this output looks like the following:
<span><div class="conf-macro output-inline" style="" data-hasbody="true" data-macro-name="div"></span>This is the content.<span></div></span>
When I add a second paragraph, then the title and both paragraphs are rendered correctly, making the HTML on the rendered page look like this:
<span><div class="conf-macro output-inline" style="" data-hasbody="true" data-macro-name="div"></span><span><h2 id="Contracts-Title"></span>Title<span></h2></span><span><p></span>This is the content.<span></p></span><span><p></span>Second paragraph.<span></p></span><span></div></span>
Here is the markup from the page's source for the macro:
<span><ac:structured-macro ac:macro-id="1014f412-f46d-475c-8308-1ba339d8390b" ac:name="div" ac:schema-version="1"></span>
<span><ac:parameter ac:name="atlassian-macro-output-type"></span>BLOCK<span></ac:parameter></span>
<span><ac:rich-text-body></span>
<span><h2></span>Title<span></h2></span>
<span><p></span>Content<span></p></span>
<span></ac:rich-text-body></span>
<span></ac:structured-macro></span>
I have tried removing all plugins, scripts, and styles from my Space but the behavior is the same.
Why is this simple macro changing the HTML content of its body at all let alone indiscriminately removing tags?