I don't know why they use muskets, because I'm pretty sure the manufacturing process for a repeating rifle (you put in a bunch of rounds and take a bunch of shots in a row) doesn't require electricity, since they've been making them since the mid-1800s or something. I mean, the machine gun was invented during the Civil War. You can make some pretty deadly guns without electricity. It's not some ragtag bunch of outlaws, either -- it's the dominant military power in what's left of the U.S. I don't know, maybe they burned all the books about how to make things and raided a Civil War museum. Whatever.
The point is that the bad guys have muskets in this particular scene, and they run into a good guy sitting on a roof with a modern military sniper rifle.
Bad news for them! The commander quickly pulls all his troops under cover (well, apparently it takes him several hours, because it gets dark) and formulates a plan.