If you are signed into the same Apple account on your iPhone and your MacBook, the iPhone shows up as a WiFi network option you can select without having to do any additional configuration.
It's one of those "It just works" continuity features, like sharing the clipboard between your Mac and iPhone without needing to configure anything.
You don't need an iphone, even a $50 phone will hotspot just fine. How many people travel with a laptop but no phone ?