The country that really refined mass surveillance in the digital age, China, has seen tons of investment from people who want to see big returns and for the workers to be kept in line (by force if necessary) and many countries want that sort of "prosperity" for themselves, which means sucking up to the investor class, which includes people like Peter Thiel and Larry Ellison.
If you do business with totalitarian states, there's a good chance you become one.