I understand that the EIGRP routers need to have the same AS number to peer with each other. But why can't we just use EIGRP Router ID?
If you want separate EIGRP ASes on one router, then that would not be possible with only the Router ID, and you can use the same Router ID on multiple ASes. Those are two completely separate functions. The Router ID is unique per AS.
For example, you could have a router with multiple ASes:
router eigrp 10 no auto-summary network 10.10.10.0 255.255.255.0 ! router eigrp 20 no auto-summary network 220.127.116.11 255.255.255.0 !
The Router ID could be the same or different for each AS. Having the same Router ID simplifies documentation and troubleshooting because it can be based on a loopback address.
Each AS can use different interfaces and can advertise different sets of prefixes. You could even have some overlapping interfaces/prefixes, but that has nothing to do with the Router ID.