first the mac address is considered only at the data link while the IP address is at the network layer
An IP address and subnet mask are used together to create a hierarchy for routing. The classic example is of the US Postal Service. Your address may be 123 Cow Road, timbuktu LA 12345. The postal service will route the mail to a regional center, then a local post office, and then finally to your house based on the address.
If you were given the address space 172.16.1.0 255.255.0.0 (and it weren’t private address space) you would have 16 bits of address space to assign to your hosts. Routers would not need to know how to reach every possible host within that address space, only how to reach that address space itself.
With a MAC address, this is entirely impossible. An organization that creates NICs or any ethernet interface for that matter is given a block of MAC addresses that they distribute as they please. This means that devices that fall under the same block of MAC address space could be distributed anywhere throughout the world. This creates a completely un-scalable model that would be impossible to route. Every router on the internet would have to house information on every possible endpoint. Even if every endpoint in the entire internet were in a static location, it would be impossible for any of today’s routers to handle.