It uses it to know what JS is needed for the client. If it sees <Section /> that means that no-JS is needed. But if it sees <Counter client:load /> it knows to build + bundle the Counter component and attach its JS to the page.
The reason why you don't know is that you've decided in advance that it's not actually needed.
.astro is not actually like MDX at all. MDX extends Markdown, Astro does not, it extends HTML. MDX is a variant of JSX, Astro is not, it supports things that JSX does not like void elements. Astro supports text inside of script and style tags, JSX does not.
If you think you can rebuild Astro with "a few extra preprocessor rules", then by all means go for it. But you're going to fail.