Parser does not understand that when <includeonly><onlyinclude>...</onlyinclude></includeonly> tags exist then wikitext-not-in-tags equals to wikitext inside a <noinclude>...</noinclude> tag and must be ignored (i.e. must not be re-rendered) to pages that this template is transcluded in. As a result of this, huge job queues are created when there is any change in wikitext-not-in-tags, when they shouldn't have.
Recently I needed to assign Page Forms to templates to semantically handle template metadata including template documentation. As we know, template documentation usually goes inside a <noinclude>...</noinclude> tag and the actual template code-to-be-transcluded goes inside a <includeonly>...</includeonly> tag. That way, each time there is a change in template documentation does not affect all the pages that this template is transcluded in.
But, since Page Forms write their wikicode by default in the topmost part of page, there was no way to make a page form write its wikitext inside a <noinclude>...</noinclude> tag .
Then I realised that from a logic point of view
The first part of the equation says that A must not be transcluded. B is transcludable-only i.e. must not show in template page. So A shows in template page but it's not transcluded and B does not show in template page but it's transcluded to other pages.
The second part of the equation says that A shows on template page and can be transcluded. But <onlyinclude>B</onlyinclude> tells the template that can only transclude B so that makes A not transcludable eventually. Being all that inside a <includeonly>...</includeonly> tag means that B (which the only transcludable thing) is also a transclude-only thing i.e. it must not show in template page itself.
So both parts of the equation tell exactly the same thing.
I have already implemented this new idea in my templates and everything does work as described above.
But then I realised that every change I make to the "A" part of a template (i.e. the non transcludable part), a huge job queue is created since some templates are transcluded to tens of thousands of pages.
So I believe that parser does not recognise the above described logical equation and re-renders pages when it shouldn't have because there is no actual change in template when only the "A" part changes.