It does actually. Cost of doing business includes all costs.
If amazon believes they need to spend money on R&D then that R&D is a cost of doing business, if its not turning a profit with that R&D spending then the business is not sustainable by definition.
Amazon was not doing R&D for shits and giggles. Just because the time horizon was long doesn't mean it wasn't any less of a requirement for their success. Amazon would not be in the same place it is today if not for that expenditure so claiming it wasn't a "cost" is just disingenuous.