If the car detects a problem in power supply circuit, it's perfectly rationale action to engage the electric parking brake as "last wish" when the car has stopped, because there are no other mechanism to prevent the car from rolling. In most cases that's the safest option, because freely rolling car is very dangerous.
A side note: Tesla has a sort-of reduntant 12V power supply, because it has a traditional 12V battery and also a 12V DC-DC converter from the high-voltage battery pack. So in theory you can lose either of those and still safely drive the car to a stop. But there can also be a problem with the 12V circuitry itself, e.g. in chassis grounding, which can cause all kind of weird problems and even total failure. This is not an unheard problem especially among older Model S cars such the one in the picture.