That has to do with the editor. From what you're telling me, you're trying to attach weapons to it using the part of the ditor that makes the ship , rather than the part of the editor that deals with variants. The ship editor tells you what kind of weapon your sship can mount, so if you hover your mouse over the weapon slot and press 't', a little info box will pop up and you can change the type of weapon you can mount. TO make a variant file that will tell the game to put weapons and stuff on it, press '2', and it should open a second editor where you can make a variant file, in which you can add capacities, vents, weapons and hullmods. Kind of like a refit screen, if you will. This is the file that the game reads from default_ship_roles to sort out how to outfit the ship.
Now, when you buy a ship, you don't buy weapons with it - just the ship. This is universal for all the ships ingame. There can be some 'built-in' weapons that are attached regardless of variant. Just press "1" in the editor, open up your ship file, hover over a weapon and press t. Then, change the weapon type to BUILT_IN. Then, press 'u', and you should be able to stick a weapon into that slot.
Hope this helps.