This confusing behaviour is typical. The underlying reason is that it is up to the carrier to decide what to do with the APN setting -— unlike most configurations of this form, you're not actually configuring any connection setting. Instead, you're just passing to the carrier a text string.
The carrier may do a number of things with the APN you've specified:
- Ignore it completely and connect you to the default network.
- Ignore it if it isn't one that it recognises (ege.g. your case of using a different provider's APN).
- Use it to connect you to the default network, but with an IP from a restricted range.
- Use it to connect you to a private network.
Additionally, the carrier may change the default/override settings at any time, which is why an APN setting might work for a while and then stop working.
There's some awfully detailed info here (LTE Quick Reference on ShareTechnote) on the confusing way APN settings behave.