A shotgun with a five shell capacity of buckshot would be a much better option at stopping the assailant in your scenario and would also be much less likely to cause collateral damage to surrounding houses.ARs are great self defense weapons. Try this little experiment. Load a paintball gun with 6 rounds and give someone a plastic knife and tell them to attack you from about 20 yards away by running a zig zag pattern. Spoiler...It's really hard to hit a quickly and erratically moving target.
Then, load the paintball gun with 50 rounds and try the same experiment again with the extra rounds and ability to shoot quickly. Spoiler...Your chances of hitting a target goes way up and the chances of a perp continuing to attack thru a barrage of projectiles is reduced.
So, when you call 911 in an emergency situation, you can expect a response time of between 3 to 15 minutes. For a lot of reasons, the AR is a great tool for holding off an attacker during the wait for help.
By your logic, why not just make fully auto weapons legal and accessible?