Where the exclusion sits is what distinguishes tax-exempt income from tax-free growth. Interest on a municipal bond is excluded because of what the income is, wherever the bond happens to be held, with no account type and no conditions to satisfy. Tax-free growth inside a Roth account or a health savings account is a property of the wrapper rather than of the investment inside it, and it depends on satisfying the account's own rules. That is why holding a municipal bond inside a Roth account adds nothing: the interest was already excluded, and the contribution room has been spent on income that needed no shelter.
The exclusion is federal, and states go their own way. A state that taxes income commonly exempts interest on bonds it or its own subdivisions issued while taxing interest on other states' bonds. Employer-provided benefits, in contrast, tend to follow the federal treatment closely. There is no shortcut here: state conformity is a separate question for each item.
Excluded income still shows up, and in places that cost money. Tax-exempt interest is reported to you on Form 1099-INT and entered on your Form 1040 even though it is not taxed. More consequentially, several "modified adjusted gross income" definitions add it back. Section 86(b)(2)(B) increases modified adjusted gross income by "the amount of interest received or accrued by the taxpayer during the taxable year which is exempt from tax," which is the measure that determines how much of a Social Security benefit becomes taxable. Someone who moves a portfolio into municipal bonds specifically to reduce reported income may find that particular figure unchanged.
The exclusion is not free. Section 265(a)(1) disallows deductions allocable to tax-exempt income, and section 265(a)(2) disallows interest on debt "incurred or continued to purchase or carry obligations the interest on which is wholly exempt," which is why buying municipal bonds on margin is self-defeating. Separately, section 57(a)(5) makes interest on specified private activity bonds a preference item for the alternative minimum tax, and section 103(b) excludes non-qualified private activity bonds, arbitrage bonds and unregistered bonds from the exclusion altogether. "Most" municipal interest is exempt is the accurate hedge, not "all."
A category worth separating out: income that is exempt to one person and taxable to another. Life insurance death benefits are excluded to the beneficiary under section 101(a) but the policy's cash value is a different question entirely. Gifts and inheritances are excluded to the recipient under section 102 while the transfer tax system operates on the giver. The exclusion attaches to a person and a receipt, not to the money itself.