What is benefit of allocating ASN to edge routers and not Ip addresses ? I mean we could have given these edge routers unique public ip addresses too ?
Edge routers do have IP addresses, in-fact they will nearly always have multiple IP addresses.
The design of internet routing is designed to maintain a separation between "Internal" and "external" routing and hence simplify the overall routing problem. The "Path" information in BGP only indicates the list of independent networks that the traffic passes through not the precise links it uses within those networks.
AS numbers are used to identify the independent networks in a path, both for troubleshooting purposes and to prevent the inadvertent formation of routing loops.
Decoupling internal and external routing is important because it reduces the "blast radius" of most network changes, both short and long term. In the short term it means that a path change within an ISP, say because of a link going down does not affect the routes that are propagated to other ISPs. In the long term, it means that an ISP can freely design their internal network without worrying that the perceived number of hops or the internal weights assigned to those routes within their network will affect routing preferences of devices in other networks.