Back when AliPay and others were scaling up not too many phones had NFC.
However, more importantly, QR is way better from merchant's stand point. A static QR code is a thing of beauty. A tiny mom-and-shop merchant could take a printout and stick it up on their physical store front. It allowed AliPay to onboard of hundreds of thousands of merchants with minimal or no operations team on the ground. This strategy was almost 100% replicated in India by Paytm and their ilk. It was incredible to see even the smallest of shops with a printed QR codes stuck to their push carts, rickety shops etc.,