Your phone connects to WhatsApp's servers. So does your laptop. The bridging is likely done server-side. I assume this is done because WhatsApp is (probably) using end-to-end encryption, so everything must be ran by your phone (which is the only place where your private key is stored) in order to encrypt the messages.
How on earth does that work? Say my phone's on data, my laptop's on my home wifi with NAT. How does Whatsapp on the web reach my phone?