A comparative study of the history of these two companies points out that Amazon has gone from an exclusive product seller to a company that now sells products, offers services and is a technology provider. On the other hand, eBay has been completely focused as a service provider. eBay has stayed the course without excessive change.
Amazon.com started out as an online bookseller. Indeed, to some, Amazon.com will always be a bookseller. Selling books on the Internet made sense at many levels. To Jeff Bezos, the main advantage was selection: 
Books are incredibly unusual in one respect, and that is that there are more items in the book category than there are items in any other category by far. There are more than three million different titles available and active in print worldwide. When you have this huge number of titles, a couple of things start to happen.
First, you can use computers to sort, search and organize. Second, you can create a super-valuable customer proposition that can only be done online, and that is selection. There are many categories where selection is proven to be important: books, in particular, with the book superstores, but also in home construction materials, with Home Depot, and toys with Toys 'R Us. Online, you can have this vast catalog of millions of titles, whereas in the physical world, the largest physical superstores are only about 175,000 titles, and there are only three that big.
In addition, as a product, books were easy to ship since they were not bulky, they represented a low value (and risk) item and they are informational products making them amenable to selling them via online storefronts using features such as sample chapters, table of contents, editorial reviews and customer reviews.
However, Amazon.com rapidly expanded into a number of products. Here is a timeline for the first few product introductions: 
June 1998: Music
November 1998: DVD/video
July 1999: Toys and electronics
November 1999: Home improvement, software and video games
Its foray into music was dramatic. "In Amazon's first full quarter selling music CDs, ending last September, it drew $14.4 million in sales, quickly edging out two-year-old cyber-leader CDnow Inc."  However, it is not clear if it could translate such success into products as disparate as cookware and hardware.
The following arguments have been made in favor of rapid diversification:
Amazon wanted to get a greater share of each customer's overall shopping basket. They felt that they had already established a relationship with the customer with books. All that remained was to leverage this trust in persuading consumers to buy everything else from them.
From a technology standpoint, the company had already incurred the fixed costs of developing software for the online storefronts. Expanding into other product categories would allow the company to spread these fixed costs across a larger pool of transactions leading to greater profits. As Bezos put it: 
On the Internet, companies are scale businesses, characterized by high fixed costs and relatively low variable costs. You can be two sizes: you can be big, or you can be small. It's very hard to be medium. A lot of mediumsized companies had the financing rug pulled out from under them before they could get big. …
When we open a new category, it's basically the same software. We get to leverage the same customer base, our brand name, and the infrastructure. It's very low-cost for us to open a new category, whereas to have a pure-play single-line store is very expensive. They'll end up spending much more on technology and other fixed costs than we will just because our earlier stores are already covering those costs.
Selling books alone would not catapult Amazon as the leading e-tailer and a cuttingedge firm. They would forever be constrained by the small market that they operated in. Moving into other product categories allowed them to be thought of as a dominant retailer as opposed to a ho-hum business.
Perhaps, the most important reason for Amazon to diversify was that at the time it was a darling of Wall Street. Skeptics were overruled by high-flying optimists who viewed Amazon as the symbol of the new economy and a new way of doing business. As a result, Amazon made the best use of the opportunity.
On the other hand, many arguments have been made against expanding into new product categories:
Amazon established a relationship with its first customers on the basis of being a bookseller. Redefining this relationship in terms of other product categories is a nontrivial task. A typical customer reaction can be stated as, "Many of us old customers have a hard time thinking of Amazon as a place to buy a set of Polk home theater speakers or a set of Calphalon cookware. For me, the Earth's Biggest Bookstore moniker has occupied a spot in my mind since it began appearing in those tiny bottom-of-page-one advertisements in the New York Times." 
As mentioned earlier, books provided certain unique advantages to Amazon. Moving into new product areas provided new challenges. The case of consumer electronics items illustrates this best.
In this business, Amazon.com has not been able to buy directly from leading manufacturers such as Sony, Panasonic and Pioneer. As a result, Amazon is forced to buy products from distributors leaving it with a hefty competitive disadvantage that may be hard to overcome . In addition, selling at prices lower than what the manufacturer wanted strained relationships with such giants as JVC .
There are many reasons for this . In the electronics business, manufacturers have a stringent set of requirements on how a retailer will display and sell their products. Only retailers who pass this are pronounced authorized dealers. Authorized dealers get lower prices, money for cooperative advertising and the right to sell warranties. Large manufacturers did not want to jeopardize existing relationships with retailers by selling through Amazon—whom they feared would sell at lower prices. At the same time, some manufacturers wanted to set up their own online stores. For example, Sony sells electronics through sonystyle.com and deals with the online counterparts of established players such as Best Buy and Circuit City.
Moreover, some manufacturers felt that Amazon did not have a long-enough history in the business and were turned off by its string of losses. Also, Amazon may have appeared as too unconventional for them to feel comfortable—e.g., Amazon's reliance on e-mail as the primary customer service tool did not please some manufacturers.
The vital part of this is that electronics represent the fastest growing part of Amazon's business while the book, music and video portions have leveled off. As one analyst from Prudential put it:
"It has been our contention that if the most profitable part of Amazon's business is not growing, and the most unprofitable part of its business is growing rapidly, the company will begin to experience economic deterioration."
In the final analysis, the company has showed an inability to grasp the intricacies of some of the businesses it entered into. Interestingly, BN.com did not diversify beyond books, music and videos.
Amazon.com was the de facto first-mover in the book market. But, this was not the case in most other product categories. For example, e-tailers such as CD Now were already in place before Amazon.com appeared in the music category. As a result, Amazon exposed itself to new levels of competition creating new vulnerabilities. In many cases, established players in the brick and mortar space had also established a presence in the online arena. Moreover, as brick-and-mortar stores such as JC Penney and Circuit City expanded to the online arena, Amazon was faced with escalating levels of competition.
Amazon.com's business is not driven by technology costs alone. Rather, its costs are significantly dependent on the handling of physical goods and inventory. As the magnitude and variety of good increase, the cost of real estate, labor and inventory also increase .
In addition to expanding into new product categories, Amazon.com proceeded in two new directions. The first initiative was to partner with e-tailers who sold products that Amazon did not carry and did not plan to carry. The second one was to host several small businesses as part of the Zshops initiative. Jeff Bezos explained that:
"It's not a shift in the model. It's something we had always thought about. For at least a year, we've been talking about ourselves as a 'platform'. It's a foundation or a workbench from which you can do a lot of things. In our case, it consists of customers, technology, e-commerce expertise, distribution centers, and brand." 
With each of these initiatives, the company leveraged its reputation and minimized its risk, but it also relinquished control over the consumer experience. In addition, it created layers of complexity and cost due to issues of due diligence and monitoring.
Unlike Amazon, eBay has been very focused as a service provider. The major variation from this strategy has been the purchase of Half.com, which is a fixed-price retailing operation. This is a place where consumers can go to buy new items. In addition, the company recently acquired Paypal, a leading provider of person-to-person payment services.
eBay has many other service operations:
eBay International. eBay has consciously tried to create a global marketplace. Even though users from other countries may bid on U.S. auctions, the legal and financial barriers prevent easy trading. Country-specific sites are seen as the way to overcome this. As of now, eBay has country-specific sites in Austria, Australia, Canada, France, Germany, Ireland, Italy, Japan, Korea, New Zealand, Switzerland and the UK.
eBay Motors. In addition to selling used cars online, this site features motorcycles, as well as auto parts. The company has created a unique trading environment with services such as financing, inspections, escrow, auto insurance, vehicle shipping, title & registration, and a lemon check.
eBay Stores. eBay Stores expands the marketplace for sellers by allowing them to create customized shopping destinations to merchandise their items on eBay. For buyers, eBay Stores represents a convenient way to access sellers' goods and services. Buyers who shop at eBay Stores are able to make immediate and multiple-item purchases for fixed-price and auction-style items.
eBay Professional Services. Professional Services on eBay serves the fast growing and fragmented small business marketplace by providing a destination on eBay to find professionals and freelancers for all kinds of business needs such as Web design, accounting, writing, technical support, among others.
eBay Local Trading. eBay has local sites in 60 markets in the U.S. These sites feature items that are located near them. As a result, buyers pay low shipping rates—especially for difficult-to-ship items such as automobiles, furniture or appliances.
eBay Premier. This is a specialty site on eBay, which showcases fine art, antiques, fine wines and rare collectibles from leading auction houses and dealers from around the world. Through its "Premier Guarantee" program, all sellers on eBay Premier stand behind and guarantee the authenticity of their items.
eBay Live Auctions. This interesting feature allows consumers to participate in auctions being conducted by the world's leading auction houses.
Amazon.com 1999 Annual Report 10-K/A, p. 5.
The first quote is from http://www.businessweek.com/magazine/content/01_13/b3725027.htm
This entire discussion is based on http://www.thestreet.com/_cnet/stocks/timarango/1449487.html
Thanks to my student, Eng Lim, for pointing this out.