The fact AWS ultimately was successful particularly at driving profit was luck. The core of their business and culture is still retail.
Their retail strategy and scale on the internet meant they needed technical expertise the same as how a traditional retail company needs real estate, construction, and merchandising expertise. It doesn’t make them a tech company because they utilized tech in a large scale and had the physical assets and data center expertise to launch a product like AWSes.
I would absolutely agree that it doesn't make much sense to talk about the retail arm as a tech company any more, although it's not 100% clear cut since the company's apparent strong interest in aggressive automation may undercut that argument.
However, AWS appeared before the retail division even made a profit, and it continues to be the real revenue generator, and in this sense, regardless of the state of the retail division, it still seems fairly useful to categorize the company as a tech company.