As a Virginia lawmaker, Ibraheem Samirah has studied internet privacy issues and debated how to regulate tech firms’ collection of personal data. Still, he was stunned to learn the full details of the information Amazon.com Inc. has collected on him.

The e-commerce giant had more than 1,000 contacts from his phone. It had records of exactly which part of the Quran that Samirah, who was raised as a Muslim, had listened to on Dec. 17 of last year. The company knew every search he had made on its platform, including one for books on "progressive community organizing” and other sensitive health-related inquiries he thought were private.

"Are they selling products, or are they spying on everyday people?” asked Samirah, a Democratic member of the Virginia House of Delegates.