This can usually be done on iOS by testing custom URL schemes. When it became apparent apps were doing this, Apple changed it so that you need to declare at build time exactly which schemes you are looking for. This information is present in the app bundle, so anybody can download and inspect the Uber app to determine if they are doing this.
I am using an iPhone. I assume the difference comes from taking a break from one app over the other. They are probably noticing I'm not doing my usual routine (because the other app gave me a discount).