It's part of the LLVM philosophy that the compiler tools should be usable as a library. There was a not insignificant amount of drama[0] when the folks working on LLD (the then-new LLVM linker) decided they weren't going to follow that pattern. It was another 5ish years before they revisited that decision[1], but it's not a simple task to retrofit a project with proper error handling (exit on error is fine for a binary, but not a library), memory management (leaking is faster than freeing memory for a short lived process, but isn't acceptable in a library), etc.
[0]https://discourse.llvm.org/t/lld-status-update-and-performan...
[1]https://discourse.llvm.org/t/rfc-revisiting-lld-as-a-library...