Because this is higher level in terms of functionality than OS. Android API lets you access hardware, e.g., get a photo from camera, establish a network connection.
I didn't say make it part of the OS, I said part of the Android Open Source Project. The platform SDK (applications, services, UI, media playback, notifications etc. etc.) and the support library are both extremely high level and part of AOSP.
There are many applications of this stuff outside of Android though. I agree that it's a little weird for it not to be incorporated in AOSP, but it could be used on Chrome OS. Heck, maybe even iOS? I think Google is just trying to keep the door open for developers on different platforms.
because the developers would be stuck with the version the manufacturer ships with the device, this way all users are on the same version. they could still open source it though
Because that way Google gets to decide what uses you put its AI to. Recognizing faces and barcodes? Sure. Want to ask for the AI's help in recognizing business opportunities in click data? Sorry, that functionality is reserved for Google.