The network/SIM can reprogram some settings automatically.
The APN is the gateway through which all your phone's data connections go. This is how the carrier can bill you and track your use. You just had an incorrect gateway specified. It doesn't have anything to do with IPv4 or IPv6, unless you also had your phone configured to use IPv6, which can happen.