A5/A7 2017 were released with an outdated 6.0.1 marshmallow while other phones released at the same time were running nougat.
Samsung claims that it gives A series phones 2 major updates but this was not technically 2 major updates because they were released with an outdated os version an unfair update policy for the A5/A7 2017 users,we consider this cheating!
Phones that were released in the same time as A5/A7 2017 but they were running nougat
LG K10 (2017),LG K8 2017,Huawei P8 Lite (2017),Nokia 6,Honor 8 Lite,LG Aristo,Huawei Mate 9 Pro,OnePlus 3T, HTC U Ultra,Asus Zenfone 3s Max,ZTE Blade V8.
The only reason why A7 have a bigger battery is because the screen is larger, thus the battery needs to compensate for it by giving more power. The A5 and The A7 are completely the same. Only A7 is bigger. The battery life of those two phones is the same.