I'm sure Google/Apple know about this and have the measures to detect it. It's as easy as see the location of the IP from which they installed or a lot of other parameters they track.
What surprises me is that they allow this since it's totally unfair to developers like me and my girlfriend that make a great effort in the time free of work to make those apps...