Probably due to taxing laws. Citizens get a discount, tourists don't. Or you get a discount dependant on your age, etc.
Also: the fact that you bought a metro tickets contains zero actionable information for any "agency". Great, you have a ticket. When will you use it, though?
And, again, the entirety of Central Europe has mandatory IDs for decades. Just look at how incompetent the police over there is to see how little it does for "spying" or "controlling the population".
Bah! Poland's communist government imposed upon them by the USSR made the IDs mandatory and they still got toppled by the student and worker underground. Where was this "control" then?