Most messaging apps access and collect info such as device identifier, contact list, position of the phone etc. They share it with law/ govt agencies to comply with legal requests.