I had it happen once on my BMW Cruise with Bosch Performance Line and 400kwh battery. I left the house with about 80% battery and rode a little over 40 miles. I had the same experience mentioned by another poster here. The last bar cuts off much sooner than you'd expect, a little bit like a car gas tank where it takes a lot of miles to go from full to half-full, but the last quarter of a tank goes more quickly than you'd think.
I was less than a mile from home and there weren't any significant hills in front of me. I put the bike into a low gear and it was definitely tolerable, but not fun. In general, I wouldn't pleasure ride my e-bike without power. I'd do it to extend range or to make the workout tougher, but it's a bit like trying to drive a Volkswagen Beetle up a big hill.