Sometimes you have an idea for a barbarian king on a throne with his badass skull sword but he's also been a space captain. And you think "How do I square this circle? How can a barbarian king with a sword also have a laser gun?"
Well, you only ask that question because you've been brain-doped by pop culture into thinking laser guns and badass skull swords are artifacts of completely different genres. But what the actual fuck is a "genre" anyway?
Ok, I don't want to get into that.
Look, you don't have to mix lasers and swords. I certainly don't do it all the time. I completely understand the desire to have a setting or story in which the technology is distinctly "ancient" or in which it is distinctly "futuristic". But if you want your barbarian king to have a laser pistol you damn sure can and you damn sure don't have to explain it to anyone.
"Why do your feudal warlords carry phaser rifles??"
Because they do. They live in a world where there are phaser rifles and feudal warlords with broadswords. What part of this reality don't you understand?