Typst interprets the content of your inner theorem as normal text, not as a paragraph. The theorem function uses a block element, and inside it the text needs either a parbreak or a block-level elment to be interpreted as a paragraph. See the docs.
Hmm, this is not very nice that it sometimes gets the paragraph indent, based on whether it has a paragraph break or not in it. You can work around this by modifying the fmt-body function:
(I should probably update the package to do this by default)
Unrelated, but I would recommend you don’t nest the theorems (there is no benefit to it). If you want to group theorems somehow, why not wrap them both in some outer block?