But in D&D 5e 2024 it's a LOT of labour (Thinkerer): 50gp for the tinker's tools, 250gp for the musket materials, and 400 hours of work making one. Based on our 40 hour working week, that would be two and a half months of work, or maybe 5 muskets per year per Thinkerer. Of course the Thinker would need 300gp up front for tools and material, not to mention working space, and board/food for those two and a half months... With only a day off per month, you would maybe get seven muskets per year per Thinkerer.
A guild, noble, king might hire a Thinkerer for 2gp/day, paying for the workshop, the Thinkerer tools, and the musket component prices. They hire a hundred Thinkerers for a year and spend 180,000gp plus the price of a workshop, armory, guards guarding that, etc.
Now imagine a thief with a Bag of Holding (or ten = 4,000gp) stealing those 500 muskets (worth 250,000gp)...
Imho the only reason why Gith (pirates) have muskets and pistols at all is because they kick in a thief with two Bags of Holding (only 800gp), drag all the muskets, pistols, and ammo into a 10' radius, 'detonate' the Bag of Holding inside the other Bag of Holding in the middle of the pile and get dragged into the Astral plane, where their buddies pick up the goods with the thief... No need to exit at all...
Not in D&D, in D&D a musket and pistol are martial weapons, while a light crossbow is a simple weapon. What people keep forgetting is that we're talking D&D and not RW...
That's because most people overvalue what a firearm can do, and undervalue what a simple knife can do... Hence they assign far more damage to a firearm then to a knife.