QR codes can be decoded locally on your phone. That means scanning can work even if you are traveling, in low-signal areas, or simply prefer not to use data.
Scanning is offline. But if the QR code contains a web link, opening that website requires internet.