On my Android Firefox 129.0.2 the text only takes up the middle third of the screen horizontally. I get the same linebreaks as in your screenshot though. For me this is not nice to read and feels like way too much wasted space.
Yeah the headings being teeny weeny is jarring.
Differentiating headings using smaller size than text is legit approach as hiearchy is created using difference (not size). Its often used in print.
But this is so badly executed it looks more like a mistake.
Judging also by the lack of padding around section headers I'm pretty sure them being in a smaller font was not a design decision in this case, but rather a lack of testing.