I believe they bought an app that was already providing a similar service, [0] so they didn’t need to purchase and organise the library themselves. I’d imagine this was pretty cheap and fast to build, compared to other apple projects!
Low investment and pre-existing user base to migrate seems like a pretty good deal.
[0] https://www.apple.com/ca/newsroom/2021/08/apple-acquires-cla...