Well, think of it what you will, but if you read what Halide team actually wrote about this in their software, it will became clearer that this is not necessarily "limited by Apple" rather - really some software innovation that developers get to do on Apple platform.imagine that, existing older hardware perfectly capable but limited by apple

iPhone Macro: A Big Day for Small Things
The iPhone 13 Pro features a new camera capable of focusing closer than ever before—less than an inch away. This opens a whole new dimension for iPhone photographers, but it’s not without surprises. Let’s take a tour of what this lens unlocks, some clever details you might

Kind of like 1000 other examples where a developer does something that make the phone better at doing it than software that Apple ships in the box (or might not even ship in the box).
Also - the usability of Halide is not nearly where Camera app is; Apple's implementation of Macro in 13 line does not require manual modes, careful focusing etc. for "good" results.