Android has been trying to remedy that for many and many versions, and the latest Android 8.1 Developer Preview adds one more weapon to your arsenal in the fight against battery drainage.
On Android 8.1, if you check the Battery settings, you may see one app highlighted at the top with a red warning battery icon. It’ll tell you which app has been draining the battery and how.
Tapping on the message gives you one way to remedy the issue. For example, in the case of Maps Preview you can turn off location for the app… which defeats the purpose, but oh well.
Maybe soon Android will explain to you exactly why your battery has drained quickly, including non-app reasons such as you used Bluetooth for too long or your reception was crappy for most of the day, but for the time being, this is a small step in the right direction.