This activity refers to data mining (using big data analytics for marketing decision-making). In a typical business/marketing context, the phrase:

“Amazon collects massive amounts of data about how, when, why, where, and what people buy, and then analyzes those data to better serve its customers”

is describing how a company uses data mining and big data analytics to discover patterns in customer behavior and then apply those insights to improve recommendations, personalization, pricing, and service.