Wifi is the local distribution, just like the wifi at home is just for your house.
At home you would have something like google fiber or at&t internet (dsl/cable/fiber) and that would be connected to a modem/router that provides wifi in your home
The main connection to the internet on planes is via satellite, viasat and iridium are 2 providers for aviation internet for example.
They also have a wifi router in the plane to share the connection with passengers (and for the plane/pilots itself ofc)
Latest Answers