There are a few things here. You are correct that this is for external processes. You are further correct that you can push the heavy part of a diff and such to an external process.
At that point, you have the textual output in a buffer and you want emacs to simply render that buffer in a "pretty" way. This is done for many things, grep being one people are most familiar with in emacs. It can recognize each match with enough detail to let you jump to the file it is in. I don't know how magit renders diffs, but I'd imagine it should work roughly the same way. Probably leaning on some other elisp to allow common editing.
My point holds that more and more languages have server protocols that would be akin to an external process, now. In this way, there is little benefit in reimplementing a ton of stuff in the emacs process. Especially with the standardization of leaning on json, the link to the external process can be a textual buffer just fine.
At that point, you have the textual output in a buffer and you want emacs to simply render that buffer in a "pretty" way. This is done for many things, grep being one people are most familiar with in emacs. It can recognize each match with enough detail to let you jump to the file it is in. I don't know how magit renders diffs, but I'd imagine it should work roughly the same way. Probably leaning on some other elisp to allow common editing.
My point holds that more and more languages have server protocols that would be akin to an external process, now. In this way, there is little benefit in reimplementing a ton of stuff in the emacs process. Especially with the standardization of leaning on json, the link to the external process can be a textual buffer just fine.