There wasn’t anything unique about Amazon when they started out. There were at least 4-5 other big online only booksellers.
They didn’t really take off until they allowed third party sellers to sell directly to consumers. First media sellers and then other categories. Then amazon used their sales data to cut out the 3P sellers and made even more money selling their own products to amazon customers. The rest is history.
Things really took off in 2018, when net income leaped from $3,033MM to $10,073MM on the strength of (as you noted) third-party service revenue growth of about $11bn, followed by subscription service revenue growth of $4.4bn. That helped North American operating income explode from $2.8bn to $7.3bn.
It must be acknowledged, however, how important AWS is to Amazon's bottom line. While the operating profit for North America and AWS were almost equal in 2018, by 2020 AWS's operating income was 56% higher than that from North America.
I wouldn't be surprised if Amazon's book selling business was a loss-leader nowadays.