being same brand means very little. i could have a lipo battery and a nicd... lipo will last longer
if they are both the same then one might just have a better mah rating
if the mah rating is the same then age, conditions, exposed to weather, memory effect.... there are heaps of things.
if you have 2 identical batteries from lets say samsung, one is for the galaxy and the other for their el cheapo phone then also factor in which uses more power.
greengiant is right the list is LONG of reasons they last different times.