This is not about the 3.3V and 5V standard, but about the others you see - 12V, 9V, etc.
Common alkeline battery cells have a natural voltage of about 1.5V. That's not so much by design as purely how the chemistry works.
So making a battery by combining cells you naturally end up with multiples of 1.5.
6 cells together makes a 9V battery.
8 cells together makes a 12V battery.
Car batteries (nominal 12V) have a higher voltage per cell, so 6 individual lead acid cells (pairs of plates) in an acid solution make up a 12V (higher O/C) battery. The same with 12V sealed lead-acid batteries.
Different chemistries give slightly different voltages, so you will see 1.2V (NiMh), 2.1V (lead acid), 3.6V (lithium) etc.
Lithium Ion and its derivatives, which are a completely different kettle of fish, of course, have the highest of all the common per-cell voltages, and devices powered by those will have voltages in multiples of ~3.6V.