Apple has been selling photo prints and books through the Photos (previously iPhoto) app for many years. But the company is exiting this business in the fall.
I guess you could ask, why was Apple still in the print business at all? Sure, in the early days, it was probably somewhat lucrative, since it was so easy to order prints directly from within the app. But there is so much competition that there’s little point to Apple being involved in this. And Apple certainly didn’t do this printing themselves; they outsourced it to a company whose core business this is.
There are a number of Mac apps that can work as extensions to Photos that offer this service, and clicking the left-hand button above takes you to the Mac App Store to check them out. And there are hundreds, even thousands of companies offering prints online.
The advantage of using the Photos app, or an extension, is that you can organize projects from within the app, making it very simple. If you install one of these extensions, you can access it from the File > Create menu when viewing a photo album.