In any e-commerce business you have challenges like:
1. Getting traffic to online store.
2. Converting it to sales.
3. Able to deliver it to customers in time.
4. Service the complaints or product in time.
Out of this website traffic is directly linked to assortment and sales is directly linked to price (value for money vis a vis quality) and delivery besides traffic. Logistics i.e. storing, sorting and last mile delivery is one of the toughest challenges to solve in this business. Amazon used UPS, FedEx and USPS in the beginning to help them understand how its done, acquire expertise. They took that knowledge and than applied technology to solve some of the challenges and reduce costs.
It was just a matter of time they become full logistics company, because in reality every retailer and distributor is primarily a logistics company with stores, warehouses and distribution center.
So it's hardly surprising they are competing with them. But I feel UPS, FedEx still do many other B2B supply chain work like delivering components to manufacturing site, vendor managed inventory, defence supplies, government supply chain, Olympics, major events and sports supply chain etc. so there will still be room for them to grow.