They did what every secret service of every nation would do to defend the country by internal and external enemies, especially those enemies who wanted stalinism all over Europe.
Heydrich worked to keep Germany safe, and he was killed because of it. The "surveillance" of the time was nothing compared to today's constant mass surveillance and spyware.