You might be thinking the lithium-based traction battery is the only battery pack in modern electric cars. And, you would be wrong. Look under the hood and you'll find a 12 volt lead-acid battery just like you'd find in a gasoline car. Let's talk about why that battery is there, and how it is kept charged.
The 12 volt system
All the accessories in an electric car run on the 12 volt system, just as they do in a gasoline car. That's the interior lights, external lights, the horn, the heating/cooling, the infotainment system, seat accessories, automatic windows, and everything else.
That 12 volt system comes from somewhere -- namely the 12 volt lead-acid battery.
There is an effort by some car makers to shift to a 48 volt system rather than 12 volt system. If this were chosen for an electric car, the lead-acid battery would then be 48 volts rather than 12 volts.
The need is the same - to have a battery pack meant to maintain voltage, whether 12 volt or 48 volt, for the on-board car systems just named.
Why is the 12 volt battery a lead-acid battery?
There may be a legal requirement that the 12 (or 48) volt system be powered by a lead-acid battery. But there are a couple technical reasons that could lead a manufacturer to choose a lead-acid battery.
Cost The cost for the lead-acid battery is much less than the lithium-ion battery.
Off the shelf The manufacturer can certainly throw a few cells in a box, add a small BMS, and design a 12 volt lithium-ion battery pack. But why go through that trouble when suitable 12 volt batteries are available off-the-shelf and are very easy to integrate into a vehicle?
Easy to replace It's easy to find replacements for 12 volt lead-acid batteries, just go to any automotive parts store.
Small gains in weight reduction The lithium-ion battery would be lighter weight than the lead-acid battery, but the weight difference is not all that great for such a small battery.
How is the 12 volt lead-acid battery kept charged?
The 12 volt system is constantly draining the 12 volt battery while driving. Therefore the state of charge must be maintained. In a gasoline car this is taken care of by the alternator and a voltage regulator that keeps the 12 volt battery topped up. In an electric car an alternator simply makes no sense.
Instead a DC-DC converter is used. These gizmos take a range of DC voltages on one side, and produces a stable voltage on the output side.
You can find DC-DC converters for a wide range of possible input voltages, output voltages, and amp capacities. The car manufacturer is responsible for sourcing the DC-DC converter.
Some mistakenly use the phrase "DC-DC inverter" which is incorrect. An inverter takes a DC input voltage and produces an AC output voltage. In this case the box needs to convert DC voltage from the traction battery (typically 400 volts) to the DC 14.2 volts required to charge the 12 volt battery.
The DC-DC converter in this case must also function as a charge controller. This means that it must shut off charging current if the 12 volt battery is fully charged.