IP Address vs MAC addresses
why do we need ip addresses if mac address is enough to identify the machine???
IP addresses are hierarchical, so that routers throughout the internet know which direction to forward a packet. With MAC addresses, there is no hierarchy, and thus packet forwarding would not be possible.
From MAC Address vs IP Address
When the packet is being sent out to a statipn that is on the same network LAN segment, only the MAC address is needed. When the packet goes beyond, to different networks and travels through routers, the MAC address is still contained in the packet, but only the IP address is used by the routers.
Also from What's the difference between a Mac Address and an IP Address?
MAC addresses aren't part of the discussion, simply because they never travel beyond your local network, and they can't be hidden as they're simply required for networking to work.
There are many reasons. For example: MAC address is bound to hardware. It means you can't or rather are not supposed to have the same MAC on different hardware. Imagine that google has to change DNS binding of "google.com" to "MAC" address each time they change some network card on front-end server.
Another reason is that MAC addresses are assigned by producers while IP addresses are assigned by network admins. This allows building hierarchy of addresses that is root of packets routing. This is because way from IP A1.A2.A3.A4 to B1.B2.B3.B4 is easily predictable and way from MAC#1 to MAC#2 isn't.
Next reason is that MAC is Ethernet-related stuff and there are other network technologies that might not use MAC at all.