HTML, XML, Markdown, RST is are all "markup languages" (this is what ML in XML/HTML stands for). This means that your file is a single logical stream of text, from start to end, and the format just adds properties ("marks up") to some section of the text. You can remove tags from HTML and syntax from RST and still get a readable and useful text. .
JSON and YAML are designed for storing data. There is no inherent stream of text; most of the times no one ever reads YAML documents from start to finish. If you remove all tags, the results make no sense.
(The data formats can be better or worse for working with multiline strings -- for example both YAML is great with multiline strings when using block quoting, and JSON is just a huge pain. But that does not make them markup languages)
Mixing data and markup format causes pain -- this is what XML did and this is one the big reasons people hate it. All the tooling is designed for "marked up text" use case, and using it to store data makes it awkward.