This is simplistic and wrong. You've arbitrarily narrowed down the possible scenarios to a single one of your choice (violent robber bursts into your room and attacks you without warning) and then declared a locked up gun wont solve it and sat back in satisfaction. But you don't have any experience with guns in the USA, do you? Nor did you bother to look into gun safety practices either, did you?
A gun for self-defences doesn't need to solve every possible scenario in order to be useful. It needs to be applicable to some. Safely storing a gun can be done in a number of ways. There's the archetypal safe - which you can open in 20 seconds if you know the combination and not at all if you don't. There are trigger guards which lock the gun from being used until you undo them - which will require a key or a combination (much like a bike lock). These are less secure than a safe but still offer a significant level of protection. If the trigger guard had been on the gun then this tragedy would not have occurred. And again, they can be removed by the legitimate owner rapidly. Secondly, you're disregarding all of the many scenarios in which you have more than a few seconds to get the gun. You hear someone downstairs and decide to investigate. You hear someone outside in your garden or at your back door. Or the most obvious - you don't live alone. So maybe YOU don't have time to go and get the gun, but your partner does perhaps being able to save themself. You also overlook just how violent robberies are in the USA. There was a real wave of Home Invasion style robberies and still are.
So lets summarise: You didn't look into how long it might actually take to get a safely stored gun. You also didn't consider the wide range of scenarios in which a gun might help.
EDIT: It ****** me off every time there's a horrible tragedy like this, some people immediately jump on it as an opportunity to push their anti-gun agenda.