spoofing the IMEI to the phone network is illegal in many places.
spoofing the IMEI to an application that has nothing to do with the phone network is not. The app is merely using the IMEI as a convenient unique identifier for infringing the users' privacy and has no legitimate right to it.