In computer networking, each device/host is assigned 2 different unique address. One physical address, MAC and one logic address, IPv4/IPv6, to make communication possible between any 2 hosts in the network/internet.
MAC address is flat addressing scheme. So, if all devices were connected in a flat structure instead of hierarchical(as in case of today's internet), and identification of a host had to be made with only MAC address, it would have been very inefficient. (Analogically, it is like finding an item in a sorted linked list DS)
However, IPv4 addressing scheme is hierarchical in nature, so identification of a host is much efficient. Using the network portion of the IP address you will first identify which network the host is in and then with the host portion of the IP address you will find the exact host within that network. (Analogically, it is like finding an item in a Binary Search Tree DS).
So my question is - If a host can be identified in the network/internet by just using a hierarchical addressing scheme say, IPv4 (both to identify across network and within network), then why do we need an additional address scheme (MAC address) alongside (which helps in just within the local network)?
PS: Lot of explanations are made from fellow friends, considering layer 2 and 3 of the current architecture. But why was the architecture designed that way in the first place? I could easily imagine a world where there are only local IP addresses. It's technically possible. Isn't it?