Every day, dozens of young men crowd into tiny rooms with 30 computers each in northern Bangladesh. Their mission: Trick Amazon.com Inc.

They open Amazon.com and repeatedly type in search terms, each time clicking on the links of products they were paid to boost, according to people familiar with the practice. Amazon’s algorithms begin recognizing that these products are popular, ranking them higher in the search results. The higher the ranking, the better chance of sales.

The...