First, you need sociopaths in leadership positions who champion this 'great idea' they've figured out. These people often rise up in large companies because they are willing to do this sort of thing without any remorse.
But second, you need developers to build it. A large number of them, usually, for a big project like this.
Dozens of people like us knew they were building a piece of software that was obviously illegal. Oh sure, management had probably told them some version of "but you see, it's legal because...". At a company that spent decades claiming they only hire the smartest people in the world, that doesn't pass the test for me- they had to know.
Which means that the people who built this fall into two categories, in my mind. Those who understand they're doing something illegal, but don't care- future sociopath leaders themselves. And those who know it's illegal but are too cowardly to walk away, to whistle blow, to do something about it.