Amazon.com Inc. has adjusted its product-search system to more prominently feature listings that are more profitable for the company, said people who worked on the project—a move, contested internally, that could favor Amazon's own brands.

Late last year, these people said, Amazon optimized the secret algorithm that ranks listings so that instead of showing customers mainly the most-relevant and best-selling listings when they search—as it had for more than a decade—the site also gives a boost to items that are more profitable...