If we have an article "Article" that looks like this:
# Some section <section begin=section /> Some exciting content. <section end=section /> # Another section <onlyinclude>Something unrelated</onlyinclude>
This then prevents {{#section:Article|section}} from outputting anything (and in fact, will result in the "Pages transcluding nonexistent sections" tracking category getting applied).
While this arguably makes sense, it can (and has, according to my n=1 study) lead to confusing behavior for an editor, especially if the onlyinclude tag is buried somewhere far later in a large article where it's easy to miss.
This behavior most likely started with this change which made LST respect noinclude tags, per T159465. I think it might be better to still respect noinclude tags, but either 1) don't respect onlyinclude tags, or 2) provide some form of warning if the presence of an onlyinclude tag is preventing the entirety of a section from being included. (Most likely done while in preview, or via a tracking category.)