I doubt the backup was done from an app on the phone. More likely these messages would be backed up from whatever central messaging server stores them - harvested in something approaching real time I would assume.
No the app is the front end on the device. It backs up to the backend which is some server.
I can do the same using Microsoft Exchange and the Enterprise Mobility Suite. Data on the device is periodically gathered by an agent on the phone (the app), sent to the EMS server, and stored there.