When data is off, it might not actually be off.
For example, on some android phones, the data connection shows as on when you are on a call, even tho apps cannot access the internet.
So I'm assuming the OS just built a workaround that turns data on only for calling, since if data is allowed to be completely off, people are gonna be complaining that their "Phone isn't working" as most carriers require VoLTE these days.
Same thing with location. Even if you turn location off, it is automatically turned on if you call emergency numbers.