why do laptops have 10 or 20 volt batteries if most components only use logic level voltages
Because while total power stays the same, voltage droop across a cable due to high currents can be avoided with higher voltages and lower current. Copper is expensive, and it's simpler to deal with 2.5 Amps at 20V than it is 10 Amps at 5V.