state (age, charge level, remaining capacity etc) to output a voltage from the alternator.
Technically you can put the same exact battery type back in and the alternator output will be fine but the lifespan can “potentially” be shorter unless the ECU battery system is reset since the ECU may have adjusted voltage. Ideally though it should be smart enough to reset itself for the new battery but sometimes it doesn’t unless it’s manually reset.
Reseting it also allows the system to go back to the original factory default charge state which is good or you can change battery types. If you change from a lead acid to a more modern AGM battery then the alternator doesn’t put out enough voltage to fully charge the battery type, thus the reset and selecting battery type in the programming software.