Why don’t 12v batteries connected in a series get overloaded?
Let us keep it simple for the moment.
One 12V AGM battery has 6 cell of each 2V in series making a total of 12V.
So if you connect a second 12 V battery in series then you end up with 2 x 6 cells in series making 12 times 2 V or 24V. 

Theoretically there is no limit of connecting batteries in series. Systems can be realised at higer voltages. However than there are also measure concerning extra insulation and protection against electrocution.

To charge a battery (combination of cells in series) you need a higher voltage then the battery voltage to make charging possible. That is why you need a 24V charger in your situation. This charger supplies with a little higher then the battery voltage the required current for charging. During charging the cell voltage goes up a litte bit and ends at 2.4 V per cell. For your two batteries in series being 28.8 V

Charging a 24V battery with a 12 V charger is not possible. In that case you need to charge each 12 V battery separately and when charged connect them in series before you can use them.

A proper charger also limits the charging current. The charger stops when the cell voltage reaches 2.4 V.

Note: The above is valid for AGM batteries. Not for Lipo systems. Lipo systems require a complete different charging system.