It functions this way because the virtual machine exists on the host machine, and the host machine's firewall rules are typically tied to operations, software, and events taking place on the host machine itself. Because the guest operating system is virtualized, it has its own software firewall rules and virtualized network adapter that are segmented/isolated from the host.
The VM software you are using most likely has several network adapter options including Bridge Mode, NAT, and Host-only. If you use NAT your guest VM will share the same IP as the host. If you use bridge, the host's router will assign it as a local device on the same network as the host (unique IP on the LAN). Host-only will let you route through a token ring or...