That's a problem with cars right now. The combination of a wallet key, a spare at home and always being able to go back to the dealer make it not-that-big-a-deal, in my experience.
With bikes, at the moment, it seems to be a significant problem: there are a ton of bikes in Copenhagen that end up stuck somewhere because the owner lost the key or forgot the combination. Sometimes the owners get a bolt cutter and cut the lock off; other times the police eventually show up to an area that's getting full of abandoned bikes, cut all the locks (after tagging them for a few weeks, which basically declares open season for anyone else too), and haul out a whole set of bikes. I'm not sure the economics work out for it to be worth doing the equivalent of going back to a car dealer for a new set of keys, when just buying another used bike costs $150-300. A car's worth doing it for because it's expensive, so even a dealer charging you $200 is worth it. But with bikes, even with the current economics many people don't bother: figuring out how to cut a U-Lock is more hassle than buying another cheap bike, and not much cheaper.
You plan ahead. I made duplicate keys to my condo and my car and gave them to a couple friends who can be relied on.
In a system with electronic lock you could have unique factory key stored at the manufacturer, and recovered for a $30 fee upon inspection of id/receipt/etc.