The term "markup" originates with the hand-written marks used by copy editors (human beings) to indicate changes that need to be made to a text, or styling to be applied to the text (such as italics, justification, or paragraph breaks). See for example https://www.pinterest.co.uk/pin/407927678731145164/ Typically these are instructions to the type-setter (also a human being!) who would be responsible for creating first galley proofs and then final paginated copy.
The essence of markup is therefore annotating a text to supply editorial meta-information for use in preparing final copy. SGML, XML, and HTML are firmly in that tradition.
Use of XML as a data transfer syntax was another way of applying the same technology, but it's not what markup was designed for. JSON and YAML work well as a data transfer syntax, but they don't work well for annotating texts.