In Toyota, at least, the traction battery is completely disconnected (via a relay) when the car is off. The 12V battery is needed to power anything on the 12V system up until the car starts-- that includes the car's computer, which is what (after doing all its self-checks and whatnot) activates that relay and connects the traction battery to everything else in the car.
The traction battery isn't always connected probably mostly for safety reasons (having 400-someodd volts energized across the whole car even when it doesn't need it isn't great), but that also keeps it from getting excessively drained if something in the car malfunctions. It's pretty cheap to replace a 12V lead-acid battery if it's overdischarged after you left the lights on... the big hybrid battery, not so much.