That worked, for a time. But as Amazon’s catalog grew ever more complicated and Google got exceedingly good at indexing and organizing the Web, Amazon had to confront the awkward truth that one of its chief rivals could search Amazon’s site better than its own search engine could.