What I am about to write is just my analysis, so I am not sure it is right. But here goes, addressing charging and discharging (load handling) separately:
Load Handling. Let's say the load requires 5 amps and 24 volts. If the batteries were identical, each battery will be required to put out 5 amps at 12 volts. As the batteries discharge, their voltage will decrease and their amperage will increase (assuming the load hasn't changed). If the batteries are not identical, they will not discharge at the same rate. But neither battery "knows" anything other than the load it is under. so, if one battery discharges faster than the other, the other battery will see a greater load as a result, and will discharge with a correspondingly greater current flow, but that is not damaging. On the discharge side, damage occurs from discharging too rapidly or from discharging below about10.8 volts. But that is true whether the two batteries are identical or not, and the "weaker" battery will get their first. Further discharging will damage the weaker battery, but no damage will occur the the stronger battery unless the current goes to high, or its voltage too low. But you have that problem even with two identical batteries -- you can't run them down too far or too fast without damage. If my analysis is correct, the only consequence of using two non-identical batteries is that the capacity is effectively limited to the capacity of the weaker battery (times 2).
On the Charging side, things become a little different and much more complicated. Charging the batteries independently is best and in that circumstance I don't see any potential for damage to either battery. But if they are charged together, the charger, if it is a smart charger, is going to monitor voltage and amperage to quickly charge the batteries to full capacity, without damage. So, a good charger may charge at 14 volts until the acceptance current drops to a point at which charging has significantly slowed (because it is nearing full charge), at which time the charging voltage is slowly dropped, ultimately to a trickle at about 12.8 volts. But, with two batteries, if the charger is charging at 28 volts (14 volts won't work), and one becomes fully charged, the acceptance rate of the other may not be enough to trigger the charger's reduction in voltage, so the weak (but now fully charged) battery will be overcharged until the stronger battery catches up. That will further damage the weak battery.
Note that this is for wiring batteries in series. Parallel wiring presents a different set of problems that require a different analysis. And, I may well be wrong in my conclusions, but my analysis makes sense to me.