the keys were just sold by import resellers, and they don't have the right to sell to another country (according to Steam ToS) and in this case I still wonder where Steam TOS forbids a user from buying not in his country
It doesn't. It forbids a user from buying from an unauthorized distributor. And it just so happens that authorized distributors are restricted to certain regions.
I don't like Steam ToS on this front
Can you find a better way to prevent people from exploiting loopholes in the regional pricing system?
of course you may say "ok they get your town wrong but country is a bit larger", to which I'll reply that a bunch of countries are rather small, and quite a bunch of people live near another country...
It's not necessarily a matter of country, but a matter of region. I doubt they would care much if I bought a key from Ontario, or if you bought one from Belgium, or if Borat bought one from Uzbekistan. But if someone in the Western hemisphere buys a key from China, there's not much concealing this.