Would it make much sense in a sword (and possibly sorcery) world to have trains and light bulbs but no guns?
closed as primarily opinion-based by Cort Ammon, kingledion, Renan, Ender Look, rek Nov 30 '18 at 2:51
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
I can't say that science will back up my answer but here goes. Lets say that iron ore on your world has a contaminate that doesn't get purged out during smelting process. Items cast or forged work as expected by normal physics i.e. cast iron cookware heats, steel construction beams hold things up, super sharp swords, etc. However, when the iron is exposed to rapid heat expansion (i.e. explosion from gunpowder, volatile gases, etc) it causes the contaminate to rapidly oxidize the iron - turning it into rust. After only a few uses the gun barrel or cannon becomes a danger to use as it will most likely misfire injuring whomever is use it instead of enemy it is pointed at.
Gunpowder requires charcoal/coal, petrified poop (potassium nitrate) and (optionally) sulphur.
A steel culture would probably have stumbled upon this somewhere along the line.
Imagine a technological culture which nevertheless retained a clerical autocracy, which had maintained a high degree of compliance even while encouraging technological advance, by recourse to a relentless use of terror against dissent. Such a culture's elders could ban certain practices or uses of technology simply by fiat, or on the basis of good public order, or on some sense of chivalric honor where the use of such weapons would be considered cowardly or ungodly or satanic.
However, even in this scenario, the rulers would still surely require weaponry sufficient to remain secure from popular challenge - perhaps poison or bio-weapons or chem-weaponry, with a good quantity of force troops kept organized in well-isolated cadres, to ensure the imposition of good order.