Again stating the obvious: nearly every government is breaking the law systematically, what evidences that we do not live in democracies nor states of law. Lawlessness is the "law" in the seats of power, law is only (if at all) for and against the citizens.
The German secret service BND, heir of the Nazi secret service for Eastern Europe and one of the most efficient secret services in the World, is systematically spying its own citizens in exactly the same manner as the NSA: Internet providers are obliged to give the BND all the information they request.
This is exactly what the North American NSA, the British GCHQ and the French DGSE do. And as far as my knowledge goes, as former worker of Telefónica, police never needed in practice any judicial approval to listen to any conversation in Spain either, so nowadays it is almost certain that they do inspect any telephone, email and other Internet communications systematically. And it must be common practice in most other states as well.
What's the law for? Well, for nothing at all. Just a pretext to apply selectively when convenient against the people.