Lots of more modern cars DO tell you how many miles/kilometres you have left. Same basic principle as the battery life remaining in time. This is a known estimate based on current usage levels.
The problem is only that the modern computer power usage is much more volatile than fuel consumption in a car. It can literally go from sleep to race in a split second. When you are driving, the fluctuations are usually much more regular. With battery consumption, a seldom-used energy-hungry background process can completely mess up your consumption estimates over a given 5 min window.