Typically when you have a dead battery it's just not enough to start the car, not so dead that absolutely nothing works. Even then, there is typically a mechanical backup to unlock the car from the inside or outside. The day-to-day functionality and convenience is improved, in exchange for having to remember what the mechanical workaround is when something goes wrong once in a while.
It does make me shake my head, though, when people think they are permanently stuck inside their cars because they won't read the instruction manual, even if it's in the car they're currently stuck in, to figure out there's a simple lever to pull to unlock or open the door.
Nissan didn't originate it AFAIK, but they were one of the first to put it in inexpensive cars.
Edit: it looks like the pop out flush door handles on the Tesla Model S are actually mechanical, you press them in a little and then they pop out for you to pull on them. The automatic pop out is an option you can order and turn on as part of a tech package.