The iCloud Photo Library doesn’t have any public APIs that I know of. You simply can’t recreate the Photos app completely, regardless of app sizes. Apple values deep integration into the system more than it values giving third party developers a fair chance at cloning their app.
You can access iCloud from an iOS app, it has its own public framework called CloudKit, so you could create your own version of it. If you don't like that example Chrome and Edge are both forced to use WebKit on iOS but are still much larger so.
I'd bet my money that you can roll your own iCloud-esque Photo Library and it still won't be near the 100MB territory if you just use native libraries for the UI. Everything you'd have to do from scratch: cloud auth, encryption, syncing, compression, transcoding, etc. is all at most a few MBs combined, not to mention that all of these except cloud auth are already in the built-in libraries on iOS that any app can freely use.
What the apps here are doing is shipping whole (UI) frameworks and tons of old code and assets that aren't really used anymore but nobody dares to remove.